This has been discussed ad nauseum in countless threads, but I cannot for the life of me find how to correctly provision the workflow to iterate through the collection.
Let's say I have a repeating section with a single text field that a user can add to.
The xml will look like this, in my RepeatingSection column (plain text, multiline):
<?xml version="1.0" encoding="utf-8"?>
<RepeaterData><Version />
<Items>
<Item><Thing type="System.String">First thing</Thing></Item>
<Item><Thing type="System.String">Second thing</Thing></Item>
<Item><Thing type="System.String">Third thing</Thing></Item>
</Items>
</RepeaterData>
I know I need to use Query XML to get the collection information, but I don't know how to set it up correctly. I can drill down to the "Thing" item that I want, but do I keep the e1] as the index when initially querying? If I set it to a WF variable, it doesn't work.
Here are my variables:
My For each loop performs a Collection operation to Get items from the collection (at least that's the idea)
Here is the For each:
And the Collection operation:
Which should update another plain multiline with the Thing(s) texts:
Except it only grabs the first item, which is "First thing" and helpfully logs: "Index 0 has thing First thing" which is correct but not exactly what I want.
Why is it not looping through the collection?