Repeating Table - Autopopulate Secondary columns - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating Table - Autopopulate Secondary columns

Last post 03-27-2014 02:23 AM by Wojciech_Smolka. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-24-2014 12:34 PM

    Repeating Table - Autopopulate Secondary columns

    Hello All,

    I'm new to InfoPath so please forgive me if a question I'm asking is a lame one, however I'm struggling to resolve an issue I encountered with my InfoPath form.

    I have created a form that in concept is used for ordering items, and then further I intend to upload the ordered items to a SharePoint list.

    I have managed to successfully implement the auto population of fields for the order ship to info (Name/address/etc.) however I'm unable to make a fully functional repeating table, for ordering the parts.

    In essence my Table is to be used to order parts that are pulled from a SharePoint List. Since I want to enable the users to select the Parts by both P/N and Descriptions therefore I have created auto populate rules so that when the user selects a P/N from the list all of the remaining information (Description, Price, and a default adjustable QTY) will auto populate. The user can also select from the description list and in that case the remaining information is also auto populated in the other columns.

    The problem I'm facing is that this only works for the first original row in the repeating table. 

    If I add an new row in the form, the P/N once selected from the list, will always default to the one selected in the first row, along with the remaining information. I can change it when I select from the list the second time, but then the auto populate rules will not work and the description / pricing will remain the same.

    I can use the description to select the item in the second row, and that *will* work, however then the third row will encounter the issue (regardless weather I select via P/N or Description

     Any suggestions how to fix this issue?

     Is this a simple matter of adjusting the rules or do I need to edit the underlying code? 

  • 03-26-2014 03:22 AM In reply to

    Re: Repeating Table - Autopopulate Secondary columns


    Yes you can achieve this without code. I attached a sample form that would help you understand the logic needed to achieve what you want. I'm using an XML file with data added as a resource file in the form - this should simulate data coming from a secondary data source which in your case is a SharePoint list.

    You'll see in the SelectedPartNumber field, that there are rules that set Description and Price to that of the secondary data source's Description where PartNumber equals the currently selected Part Number and so the formula for that is Description[PartNumber = current()]

    Here's the full XPath to the formula in my sample form: xdXDocument:GetDOM("ListParts")/ns1:ShPList/ns1:Parts/ns1:Part/ns1:Description[../ns1:PartNumber = current()].

    Go ahead and try to replicate the logic in your form, replacing the XML data source references to your SharePoint list, and let me know when you get stuck or need further help.


    Mel Clemente
    Qdabra® Software/
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-27-2014 02:23 AM In reply to

    Re: Repeating Table - Autopopulate Secondary columns

     Thank You! :-)


    This works perfectly, I guess my error was that I did not use the current() during pre-fill filtering, instead targeting the main data field used for refference.


    Now I just need to make the form upload to a SharePoint list once approved, but I guess that is a completely different level of difficulty.





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