Rules only capture first line of repeating table... - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Rules only capture first line of repeating table...

Last post 06-18-2009 01:14 PM by Midianman. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-05-2008 03:38 PM

    • ahieatt
    • Not Ranked
      Male
    • Joined on 03-05-2008
    • Baltimore, MD
    • Posts 5

    Rules only capture first line of repeating table...

    This is my first post to this wonderful forum.  I'm hopeful someone can help me solve this problem.

    I have created a repeating table in my form with a drop-down list and a check box that correspond to check boxes on another page in the form.  I want to be able to fill in the corresponding check boxes on the form automatically when users have finished adding all the rows to the repeating table. 

    To do this I created a button on the form outside of the repeating table and created rules for that button.  When the button is selected the rules select all of the corresponding check boxes based on the data in the repeating table. 

    For example, one of the rules looks at the drop-down list in the repeating table to determine what was selected then goes and finds the corresponding check-box on the form and selects it.  I created a rule for each of the options in the drop-down menu.

    The problem is that the rules work only for the first row in the table, not for any of the subsequent rows.   Help!

    Filed under:
  • 03-06-2008 10:00 AM In reply to

    Re: Rules only capture first line of repeating table...

    Welcome to the forum.

    Sorry for the delay in my response.

    You want to look at filters.

    If you retreive from a repeating node, while outside of the node structure, without any filter then it just takes the first record.

    When you select the field you want add a filter that says where dropdown equlas something and then it will find the first place where this occurs.

  • 03-06-2008 10:14 AM In reply to

    • ahieatt
    • Not Ranked
      Male
    • Joined on 03-05-2008
    • Baltimore, MD
    • Posts 5

    Re: Rules only capture first line of repeating table...

    Thanks for the response.  That makes sense, but how do I add a filter to a rule?  I would have to filter the table for each rule I run outside of the table...  I'm assuming that this has to be done through code.  I'm looking through the manifest.xsf file and I can see where I added a filter to the group but no coding for it.

    Can you also add filters to conditional formatting?

  • 03-06-2008 10:34 AM In reply to

    • ahieatt
    • Not Ranked
      Male
    • Joined on 03-05-2008
    • Baltimore, MD
    • Posts 5

    Re: Rules only capture first line of repeating table...

    Well, that helped but not in the way you probably intended.  I found the filter code in the view1 file.  I noticed it referenced the field differently:

    my:group1/my:Observations [ (starts-with(my:Item, "1.")) ] 

    When I changed the reference in the rule it recognized the additional rows.  I didn't even need a filter!

    This also works for conditional formatting as well.  Now I just have to change the reference in all of my rules!


    THANKS!

  • 06-16-2009 09:57 AM In reply to

    • Midianman
    • Not Ranked
    • Joined on 03-09-2009
    • Elkton, MD
    • Posts 5

    Re: Rules only capture first line of repeating table...

    Will this work with a secondary data source?  

    I had the same problem i had rules on my dropdown that set the indivdual fields of my repeating table and only received the first record.

    I then added a filters to the fileds from within the repeating table and I got the same results, only the first record.

    So I tried dragging over the group from the secondary datasource which brought over all of the fields from the secondary datasource and bound it to it.   This causes 2 problems.  One everything is grayed out under the data tab, so I can not filter it.  secondly since it is unfiltered the form tries to bring in too much data on the load and hangs.

    They look like the following where VwReservationDetails is a secondary datasource. 

    xdXDocument:GetDOM("VwReservationDetails")/dfs:myFields/dfs:dataFields/d:VwReservationDetails/@PART_ID[../@RES_ID = xdXDocument:get-DOM()/my:myFields/my:Request_No]

    Part_no is the field inside the Material_transfer group being field populated with PART_ID from  VwReservationDetails
    where RES_ID from the VwReservationDetails is equal to the Request_No (dropdown on the form)  

    I am guessing I need to include the group on the form somehow:

    /my:myFields/my:Material_Transfer
    Jester of all trades, serious in none.
    Filed under:
  • 06-18-2009 01:14 PM In reply to

    • Midianman
    • Not Ranked
    • Joined on 03-09-2009
    • Elkton, MD
    • Posts 5

    Re: Rules only capture first line of repeating table...

    Dragging the secondary datasource to my form and using the conditional formatting resolved the data display issue.  Now I just need to figure out a way to get only the displayed records to merge and publish to the list as well.

    Jester of all trades, serious in none.
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.