Combine 2 repeating tables into one drop down-list box? - InfoPath Dev
in

InfoPath Dev

Combine 2 repeating tables into one drop down-list box?

Last post 08-29-2011 04:01 PM by shniggens. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-29-2011 09:29 AM

    Combine 2 repeating tables into one drop down-list box?

    Hi guys.  It's me again. 

    I have a labor order form that has two repeating tables that pull data from 2 sepearate SharePoint lists.  One to order internal employees, and one to order freelancers.

    In another view of the form, we have a repeating table set up for rooming and travel info.  I would like to just have one table with a drop-down that gets it's values from the labor that was already ordered (the employees and the freelancers).

    How can this be accomplished?  Is it possible to have the initial order populate an xml file, and then have the rooming/travel drop-down get it's values from the xml?  If so, how would I remove them from the file if someone gets removed from the table?

    I really don't want to submit this info to a backend list just to pull it into the other table. 

  • 08-29-2011 03:49 PM In reply to

    Re: Combine 2 repeating tables into one drop down-list box?

    Just use qRules Insert command to copy from both tables into a third table that is either a secondary XML resource or in your main data source. Then, the dropdown can pull from that. You can also use qRules to sort the table after the two copies. For more on the copy command, look at Jo-Anne Alfafara's document here. Note, the rules will be different if the tables don't match (i.e. you may need two sets of rules). Also note: Ernesto's preparing a new blog this week on a technique one of our customers discovered for simplifying the copy a little bit, so you may want to look at that when it comes out. I don't think it matters in your case since you will be inserting the total number from table A and then from table B and your rules on the third table will be setting the values based on which insert fired. Set another value between the inserts, so you know which rules to run if the source tables have different schemas (since you will have to have different sets in that case). Should be 15-20 minutes max.

    Patrick Halstead
    Project Manager at Qdabra
  • 08-29-2011 04:01 PM In reply to

    Re: Combine 2 repeating tables into one drop down-list box?

    Thanks, Patrick, that's exactly what I ended up doing. 

    I added a row number field to both of my tables and had one populate a count(preceding-sibling::Group1) +1 on one of them and count(preceding-sibling::Group2) +100 on the second one.  That way I have reference to the list items in case a user needs to delete them.  Then I just filter on the row number on the qrules delete command.  It all works pretty slick.  I've been getting in the habit of having buttons to insert and delete rows instead of the clumsy InfoPath table commands and insert. 

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