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: