Getting Data From a Nested (Embedded) Repeating Section

  • 18 March 2019
  • 2 replies
  • 27 views

Badge +3

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.

1019iE4D30D39DD03EDFF.png

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.

1020i1E3F69B232AF12D2.png

 

1429i5CA3C4841D9BF09B.png

 

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.

1018i1A927150A6258FE6.png

 

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.1022i9C9C09936517F583.png

 

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.1023i2831664317917C3A.png

 

Next, a Query XML action parses out the MailName values and stores them in a collection.1024i9003D37E8BC3D081.png

 

Next, a Collection Operation joins the MailName values into a single-line, comma-delimited string.1025iD945A4C414B6149F.png

 

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.1026iD7026D1F0985627B.png

 

The results after the loop completes:1027i6D96959D4574835B.png


2 replies

Badge +9

@andyCOT 

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

Badge +3

@brightlight 

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.

Reply