Scenario
This article provides an overview of how repeating sections in the Generate Document action work in Nintex Workflow Cloud versus how they worked in Nintex for Office 365. We will look at an Expense Claim SharePoint list that uses a Nintex Form with a repeating section to capture expenses. The expenses are stored as XML in a SharePoint multiple line text column and can be used throughout the workflow.
Assumptions
It is assumed that you already have experience working with repeating section data saved as XML inside a Nintex for Office 365 workflow. A workflow and form will not be built from scratch to explain that concept, but you can review the Nintex Workflow Cloud articles Part 1: Work with repeating section data from SharePoint based Nintex Forms and Part 2: Work with repeating section data from SharePoint based Nintex Forms for more information on how that works.
This article also builds upon information from the article, Upgrade Document Generation action, which covers other aspects of upgrading the Document Generation action outside of repeating sections.
Click on the image below for context as to what the Nintex Form looks like for this article's example.
After Upgrade
- Repeating sections will need to be reconfigured in the Generate Document action. They will still utilize collection variables.
- To generate a document with repeating data in a table layout, you will need to combine collections that represent columns in the table by using the Merge Collections action.
- Your document will need to be retagged with the new repeating data tags using the Nintex Document Tagger.
Differences
- The Table Data section in the Nintex for Office 365 Document Generation action becomes the Repeating Data property in the Nintex Workflow Cloud Generate Document action.
- The Nintex Document Tagger will be opened in a separate window and is no longer a Microsoft Word plugin.
Configuration
XML Processing in Workflow
- Processing XML data from your Nintex Form's repeating sections will work the same after upgrade. The Run parallel paths action will use the Query XML action to create collections that represent columns for your table of repeating data. In this example, we setup collections for expense items that come from the repeating section on the expense claim form.
- You will need to then add the Merge Collections action after the parallel path action group to combine the collections into one object.
- Add all the collection variables to the Merge Collections action that you want to bring together. In this example, we build a list of Expense Claim Item columns with each collection by merging them.
- Finally, in the Merge Collections action, create an output object to hold the merged collections. This will be used later to add the repeating data to the document template.
Reconfigure Repeating Data for Tagging
After the upgrade to Nintex Workflow Cloud, you will have to reconfigure the Generate Document action to account for the repeating data that was merged using the Merge Collections action. This will make the repeating data available for tagging when using the Nintex Document Tagger.
- On the design canvas, select the Generate Document action. Then click the Add repeating data button in the Repeating data property section.
- Click in the Collection property text box, select Merge collections from the left menu that opens and drill down to the merged Result collection for your object variable. Click the Insert button. Set the value for Repeat by based on your requirement. Notice the contents of the Result collection contains the merged collections in the example below.
Retag the Document Template
You will need to retag your document template with all new tags that represent the data in your Nintex Workflow Cloud workflow. Tagging requires opening a document template in an editor and then opening the Nintex Document Tagger from the Generate Document action. In the following steps we will focus on retagging the repeating data section inside a Word Document.
- With the Generate Document action's properties panel open, click on the button at the top named, Open Nintex Document Tagger.
- Line the Nintex Document Tagger up next to your document template. Remember, you will have to retag all fields in the template. In this example the details section is already tagged, so we will just focus on the repeating data next.
- Click on the start tag to copy it. Then paste it in the column where you want the repeating data to start. Do the same for each collection tag that represents a column for your table.
- Save your document template. From here your generated document should return with the newly configured repeating data when workflow instances run.