Skip to main content

Hi All,

Backstory: We're running InfoPath 2010 and NW 2010 on SP 2010. In the workflow I inherited, an InfoPath form gets uploaded to SP via InfoPath Forms Services. In SharePoint, a new "document" (IP form) gets created, filled out, and then the user launches the workflow with all the promoted proerties from the IP form. Pretty standard. SO, a 2nd workflow has been created (for use once in a while) which does a Form Copy to a new form/workflow if the user needs to do that. The form copy workflow works fine for mostly every field: within Nintex Workflow, the fields of the 1st form are read into variables, then a new form is spun up, then the new form's fields are populated from the variables with the Update XML block.

Problem: The one thing that's hanging me up is a Repeating Table that has three colums with a text field in each. The user will click to Insert a New Row as needed so the row count is variable. I can loop and read the 1st form and get the data and the row count (so I know how many rows need to be on the new form), but I cannot figure out how to code the Update XML block's XPath to insert a new record or records in the new form, so I can populate it. My plan was to get the row count, insert all of the rows I need, then go back and loop it and populate it from the variables that hold the 1st form's data.

Anyone know how to programmatically insert new InfoPath Repeating Table rows from Nintex?

Thanks in Advance.

Paulie

Paulie,

For the repeating section, there are a few UDA's that Vadim has put together that can help with this.  Check out the following:

Create Parent/Child items using this Nintex forms/workflow with this trick

Using the Create an Item action with custom InfoPath form templates

or Vadim's blog to see more examples.

Nintex Workflow - Update XML Part 2 - Updating InfoPath Forms - Vadim Tabakman

Nintex Forms/Workflow - Parsing Repeating Section Data - Vadim Tabakman

Nintex Workflow - Update XML Action - Vadim Tabakman

Hopefully one of those will help.


That did it! The answer was in this article: Nintex Workflow - Update XML Part 2 - Updating InfoPath Forms - Vadim Tabakman

What cracks me up is that Vadim states "Another instance,  is when users want to add rows of data to a repeating table in the form. I  honestly can't think of a reason why right now", LOL! And that's exactly what I need, to copy an existing InfoPath form and make it be the starting form for a new workflow with all the data. I had all parts worked out including looping the Repeating Table, just now how to insert new rows in the copy. AWESOME. Thanks!


Glad to help!  And Vadim Tabakman​ has lots of gems available for just those instances.


Reply