cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
R_ADE
Nintex Newbie

Need to add loop/for each to a Nintex Workflow used to parse XML output from repeating section

Jump to solution

Hello,

 

I am new to Nintex forms and I'm having issues adding a loop/for each to my workflow when parsing an XLM output from my repeating section. I have read all posts on this forum about it and I'm still having issues (probably because I don't have much experience in workflows).

 

I have the parsing working correctly right now, it takes my XML output and spits out the fields in the repeating section but it only does that for the first section. Can someone please walk me through where the loop/for each should be in the workflow and how to make sure it goes through each submitted section?

 

I hope this is clear. Sorry I can't share files or screenshots at this time.

Labels: (2)
0 Kudos
Reply
4 Replies
Nintex Employee
Nintex Employee

Re: Need to add loop/for each to a Nintex Workflow used to parse XML output from repeating section

Jump to solution
Hi,

You need to increase the the item number in the xpath on each loop.
e.g.
/RepeaterData/Items/Item[1]/
/RepeaterData/Items/Item[2]/

You can use a variable for this and increase it on each loop.
/RepeaterData/Items/Item[{WorkflowVariable:itemNumber}]/
Reply
R_ADE
Nintex Newbie

Re: Need to add loop/for each to a Nintex Workflow used to parse XML output from repeating section

Jump to solution
Hello!
Sorry for the delayed response. Can you please break down what this looks like to me? I'm a beginner in creating Nintex Workflows so I'm not sure how to implement your solution.

I have about 9 fields I'm trying to extract. How would I increase the number on each loop for all?
0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Need to add loop/for each to a Nintex Workflow used to parse XML output from repeating section

Jump to solution

To make things easier just query the XML.
Instead of using the xpath
/RepeaterData/Items/Item[1] or /RepeaterData/Items/Item[{WorkflowVariable:itemNumber}]/
as previously suggested just use:
/RepeaterData/Items/Item
and save it into a collection variable.
Then use a for each loop to go through the collection.
This is simpler and less resource intensive as the XML is only queried once and the for each handles increasing the number on each loop.

View solution in original post

0 Kudos
Reply
R_ADE
Nintex Newbie

Re: Need to add loop/for each to a Nintex Workflow used to parse XML output from repeating section

Jump to solution

Thank you so much!

This is exactly what I needed, problem solved.

0 Kudos
Reply