amareshl
Canvas Initiate

iterate through repeating section.

I have a repeating section and trying get values from it in a workflow. fyi- I have named the repeating section and the elements in it.

I tried using Query-XML Action in the workflow with the statement: fn-XmlDecode({ItemProperty:FormData})

It decodes the data but it's not very readable.

I tried using the xpath query //RepeaterData/Items/Item to filter the items but the output data doesn't change.

Let me know is there another way to get values from a repeating section.

Reply
11 Replies
emha
Automation Master
Automation Master

Re: iterate through repeating section.

could you post a screenshot how did you configure Query XML action?

and how does your input looks like?

usually XML decode need to be done in a separate action/step before query itself.

Reply
amareshl
Canvas Initiate

Re: iterate through repeating section.

Should I split these two actions?

Reply
emha
Automation Master
Automation Master

Re: iterate through repeating section.

ok,  imho this should work.

so, the question is what exactly your FormData contains and whether your xpath does reflect this content.

if you try to parse your FormData content in xpath builder, does it recognize the structure and is it there what you expect?

please, explain as well what you mean with "but the output data doesn't change".

comparing to what your output doesn't change?

Reply
amareshl
Canvas Initiate

Re: iterate through repeating section.

The output that I see is the same no matter if I enter the xpath query or not, that's i what I meant by "but the output data doesn't change".

Also the formdata variable is supposed to hold everything on the form right? When I look at the content of it it looks cut off.

The xml is not well formed, I couldn't even parse it manually using a xpath builder.

Reply
emha
Automation Master
Automation Master

Re: iterate through repeating section.

The output that I see is the same no matter if I enter the xpath query or not, that's i what I meant by "but the output data doesn't change".

that might mean that your xpath + request to get "outer xml" address whole content of FormData.

or maybe you just haven't spot small difference (missing 1-2 xml levels/tags) since you noted 'content is not very readable'

hard to say it definitely without seeing it.

Also the formdata variable is supposed to hold everything on the form right?

I'm not sure, I haven't seen it nowhere documented.

I've seen some blogposts that read out some data  from this hidden column, but I'm not sure whether it's reliable in long term.

I would suggest to create multiline text field in list and connect repeating section in form to that field. that way you get a field in list that contains just pure repeating section data, and as well you can see the content in a list view.

When I look at the content of it it looks cut off.

The xml is not well formed, I couldn't even parse it manually using a xpath builder.

where do you look on it resp. where do you take content of FormData column from?

have you written it to history log and check it there? then you see just first 255chars of whole content...

follow the above suggestion.

Reply
amareshl
Canvas Initiate

Re: iterate through repeating section.

thanks for your help. finally I made some progress.

I was able to get the details from repeating the section in the multiple lines text field.

However it copies all the fields as plain text,I guess i need to work on this text now to retrieve the values from it.

Reply
emha
Automation Master
Automation Master

Re: iterate through repeating section.

have you changed return result to text?

if you used inner/outer XML option (as on your screenshot above) you should get XML.

Reply
amareshl
Canvas Initiate

Re: iterate through repeating section.

It is set like that, still it returns like that.

I'm emailing the value to myself, is that the only to debug this?

0 Kudos
Reply
emha
Automation Master
Automation Master

Re: iterate through repeating section.

could you post a screenshot what exactly do you get and describe what would you like to get?

0 Kudos
Reply