This topic will be a two part series. In part one, this article explains how to work with data that comes from a repeating section used in a Nintex Form. In part two, you will learn how to display this information on Assign a task action task forms and in Send an email message bodies with an HTML table.
This article assumes that you know how to work with:
In this example, a custom list in SharePoint Online will capture basic Expense Claims for an organization using fields like Title, Report Date, Currency, Approval Status, and Policy. It will also capture multiple expense item information consisting of things like Expense Type, Vendor Name, Amount, and a few other fields. To do that, a Multiple lines text field set as Plain text called, Expenses, is also included in the SharePoint list. You can click on the images below to expand and see the details of the configuration.
The Nintex Form will layout the Expense Details fields in a group at the top of the form with the repeating section control added below that to capture the list of expense items. The data captured in the repeating section will be stored as XML and connected to the Expenses multiple lines of text field.
Information captured by controls inside the repeating section is stored as XML in the connected Multiple lines of text field. Because of this, XML and collection related actions will need to be used in the workflow to access that data in other actions like Send an Email and Assign a task. The XML structure looks like the following example when stored as text.
Each row from the repeating section is stored as an <item> element inside <RepeaterData><Items> XML parent elements. Within each <item> element are elements mapped to each control inside the repeating section using the control’s ID number as the element name. You will need the control ID numbers from the stored XML for use in XPath queries later in the workflow. In the example shown, the ID for the Expense Type control is highlighted.
To get to the ID numbers, create a test record in your SharePoint list, then open the list item’s details pane to see the generated XML in the Multiple lines of text column. Copy the XML and paste it into an editor to view it.
Repeating section data will need to be displayed in an HTML table format in email messages and on Assign a task actions. To set this up, you will need to create individual collections that contain values from each control in each row by parsing through the stored XML with Query XML actions.
The next step involves building out an HTML table string that can be used in actions like Send an email and Assign a task to multiple users. For more information on that you can review the second article in this series titled: Part 2: Work with repeating section data from SharePoint based Nintex Forms.