How to get value of a value

Hi All,

I am trying to get the value in a document list.

The size of the document list is dynamic. So I am trying to get the size of the document list and then I am keeping the value as documentList[%size%]/var into variable valueVar.

Consider that the size of the list is 5, so after calculation the variable valueVar will have the value as documentList[5]/var. Now how can I get the value in this value(documentList[5]/var).

Now what I need is that exact value present in that particular position. i.e., if the document list contains the following as value,

documentList[1]/var = 10
documentList[2]/var = 20
documentList[3]/var = 30
documentList[4]/var = 40
documentList[5]/var = 50

how can I get 50 in some other variable.

Any suggestions?


Option 1

  1. Loop over documentList
  2. Branch on $iteration
  3. Map documentList/Var
  4. exit loop

Option 2

  1. Get Index=Size -1 (use sizeOfList and subtractInts service )
  2. Map documentList to a document (i.e create a top level document and then put documentList inside and map the same documentList to it)
  3. documentToXMLString
  4. queryXMLNode with query as /documentList[%size%]/text()