I was trying to extract data from a nested repeating section and the only related Forums post I found wasn't helping. Hopefully, these step-by-step details of how I solved it will save others the hassle of trial and error. Maybe someone at Nintex will post a proper example in the Knowledge Base at some point.
In my example, the goal is to collect mailing addresses for code violation letters. The first Owner Name comes from the list item properties (and is autofilled by the workflow, in production). There can be several registered addresses to be contacted and additional names for each address.
The outer repeating section is named RepeatingMailTo. The inner repeating section is named RepeatingMailName (note: I turned the borders and alternate background colors for the inner repeating section off). The text field that holds each additional name is named MailName.
I utilized the following actions. The second image displays the contents of the For each loop.
The outer repeating section is connected to a multi-line text variable called txtRepeatingMailToXml. First, a QueryXML action separates all the inner repeating sections' XML from the outer sections' XML and stores it in a collection.
Next, a For each loop cycles through the collection. It extracts the XML for the currently indexed RepeatingMailName section and stores it in a multi-line text variable.
The extracted XML is encoded. So, for the first action in the loop, a Build String decodes the XML and puts it right back into the same variable.
Next, a Query XML action parses out the MailName values and stores them in a collection.
Next, a Collection Operation joins the MailName values into a single-line, comma-delimited string.
Finally, a Build String action appends the comma-delimited string to the bottom of a multi-line string. Aternatively, one could deposit the comma-delimited string into a collection element.
The results after the loop completes:
How do you get both inner and outer data in the sam row like if i wanted to crteate list item in another list? For example:
Owner Name; 123 This Street; Tacoma, WA 98407; John Smith
Owner Name; 123 This Street; Tacoma, WA 98407; Dave Johnson
Owner Name; 456 That Avenue; Seattle, WA 98101; Jane Larson
Owner Name; 456 That Avenue; Seattle, WA 98101; Rebecca Allen
Unfortunately, I've changed my form since this posting to not include the nested repeater, so I don't have anything to review or take pictures of. I'm a little fuzzy on the memory, but...
Generally, I think I would use the QueryXML action to get all the repeating data for the form. Using a For each loop, iterate through each of the parent repeating sections and get and store the values from the fields at that level. Before moving to the next parent object in the loop, use a QueryXML action to get the nested repeating data, nest a For each loop, use the actions I described to get the nested values, and store them. Then, create the new list item from the stored values elsewhere. Seems like that would work, but I'd have to mock it up and test it.