Can I have a Rule operate on the selected node only? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Can I have a Rule operate on the selected node only?

Last post 09-03-2008 08:34 AM by Patrick. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-02-2008 12:45 PM

    • Patrick
    • Top 500 Contributor
      Male
    • Joined on 11-03-2007
    • Texas
    • Posts 51

    Can I have a Rule operate on the selected node only?

    Hi,

    I was wondering if anybody knew if there is a way to have a rule operate on the selected node in a repeating table without performing the rule on the rest of the nodes.  I realized that this is a major drag on the performance of my form, considering the multiple views with multiple repeating tables.

     

    Example being: 

    I have a set of rules to execute when a user makes a selection in a drop down list box.  My drop down list contains country IDs, country names, abbreviations, and pricing region codes (this is retrieved from an XML file), and the user selects a country (i.e. United States of America), then the rules I have set up will show the abbreviation in field in a repeating table (located in the same node/row), and set the pricing region code in a text box also in the same node/row.  I'm assuming the rule will perform it's action on all nodes within the repeating table/section, and I assume this because when I have many rows inserted into the table it takes much longer for these rules to execute compared to when I only have 1 or 2 rows.  There is a MAJOR time difference!

    The question is if I can have a changing event (i.e. the selection of a value in the 'Country' drop down) trigger the same actions as the rules would execute, but only on the current node selected.  The views where these rules are in effect have Master/Detail relationships on the repeating tables/sections shown in the view.

    I am using C# Managed code and my experience with that language is limited, but I am confident that with some help I can figure it out if it's possible.  Any help would be great, thanks! 

    -Patrick
  • 09-03-2008 07:57 AM In reply to

    Re: Can I have a Rule operate on the selected node only?

    Just to clarify -- your rules, are they set on a single field in the table? Or are they set on the table itself? When you change the drop down selection, are only items in the same row as the dropdown affected? Or are all items in the table affected?

    Hilary Stoupa

  • 09-03-2008 08:34 AM In reply to

    • Patrick
    • Top 500 Contributor
      Male
    • Joined on 11-03-2007
    • Texas
    • Posts 51

    Re: Can I have a Rule operate on the selected node only?

    Oh, sorry for the confusion.  I have a drop down that is in a 'Detail' section and it changes values in a couple fields in the same 'Detail' section.  So that would be the same as changing it in the same node/row, correct? 

    Here are my rules:

    Rule 1

    Condition (Always Applies)

    Action (Set a Field's Value):  PricingRegion_txt = xmlPricingRegion[country_id = current()]

    The other rules are the same, except they set different values from my XML into different fields in my Main Data Source. 

     

    The thing is, I think the rules apply to each node when a change is made in a single node.  Example being; node A Drop Down (DD) is changed and the rules check the DD in each row and apply the rules to the fields in each row based on each row's DD value, respectively.  (I hope that makes sense, I am typing kind of fast)

    -Patrick
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.