XML Query with Repeating Section

  • 4 March 2018
  • 1 reply
  • 1 view

Badge +5

Hi everyone,

I have a repeated section, with a few columns inside. the format of XML is like this:


<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><AssignedTo type="System.String">i:0#.w|ndssafari</AssignedTo><RequiredAction type="System.String">Make the plan </RequiredAction><TargetCompletionDate type="System.String"></TargetCompletionDate><Completed type="System.Boolean">False</Completed><CompletedBy type="System.String"></CompletedBy><ActionsCompletionStatusandComments type="System.String"></ActionsCompletionStatusandComments></Item><Item><AssignedTo type="System.String">i:0#.w|tfpnick</AssignedTo><RequiredAction type="System.String">Review for release</RequiredAction><TargetCompletionDate type="System.String"></TargetCompletionDate><Completed type="System.Boolean">False</Completed><CompletedBy type="System.String"></CompletedBy><ActionsCompletionStatusandComments type="System.String"></ActionsCompletionStatusandComments></Item></Items></RepeaterData>

I need to assign a flexi task to each AssignedTo and include the required action in the task notification. In XML query I put the value of AssignedTo in a Collection variable(colAssignees) and the value of RequiredAction (colActions) in another collection.

I can do a foreach to get the value of each AssigneTo, but I cannot figure out how can I get Required action for each AssignedTo as wellsad.png 

Really appreciated if someone can walk me through to solve this mystery.

Thanks


1 reply

Userlevel 5
Badge +14

within for each action save current iteration index value to a numeric variable.

then use collection operation and its 'Get value' operation to get an element from the other collection at a given index position.

Reply