Pre-populating a repeating table from a secondary data connection - InfoPath Dev
in

InfoPath Dev

Pre-populating a repeating table from a secondary data connection

Last post 06-19-2007 07:55 PM by blackhawk. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-19-2007 01:02 PM

    Pre-populating a repeating table from a secondary data connection

    What is the best way to take information from a secondary data source and use it to populate one field within a repeating table?   Must I resort to code?   If so, does someone have a sample I could use?

    Here is what I am doing:

    I have in my form a repeating table with 4 columns.  The first column is supposed to be a read-only text box which serves as a label.   The remaining columns are data entry.  Because this list is a little long and users will be populating most of the items, using a drop down list box and forcing them to enter item by item makes it very cumbersome for the users.  

    I would like to prepopulate the table using a secondary data source (web service in this case) that will fill in the labels.  Then, when the user has completed filling in the grid, the submit will then push that to a web service which will then write that to a back-end table.

    At the end of the day, I have to leave this infopath form with "power users" and not "developers" and I would like to avoid coding, but if I have to, then so be it.  And if I must, does anyone have any sample code I can use?

  • 06-19-2007 07:55 PM In reply to

    Re: Pre-populating a repeating table from a secondary data connection

    I was able to figure out how to do this via JScript, but I did run into one oddity, in that I had to set the namespace property in order for it to find the node in the data source.   Don't flame me for my dumb question, but if you get the DOM object, shouldn't it already have the namespaces available when you use it.  

    I.e.

    doc = XDocument.GetDOM("MyData");
    doc.selectSingleNode( "..." );

    Rather than having to do:

    doc = XDocument.GetDOM("MyData");
    doc.setProperty( "SelectionNamespaces", "..." );

    doc.selectSingleNode( "..." );

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