cancel
Showing results for 
Search instead for 
Did you mean: 

Use variable in XPATH expression

Former Member
0 Kudos

Hi guys, I need to get the value of a field to a specific position in a list. No way to make something like this in a container operation of a ccBPM

/p1:SelectPedidoJdbcMT_response/row[[$counter]]/ID where ID is the field I want to return and $counter is the variable that is the position I want to get the list row.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

For example, a list variable named listvar holds a collection of customer names. An integer variable named intvar holds the index of the data item in listvar that you want to retrieve.

Example:

The following XPath expression returns the data item from listvar:

/process_data/listvar[number(/process_data/@intvar)]

Refer this link:

http://help.adobe.com/en_US/livecycle/9.0/workbenchHelp/help.htm?content=000263.html

Former Member
0 Kudos

Hello, thank you very much for the support. That example would serve for a variable or element that is within the same structure. In my case I have the following:

I have the following variables defined at the level of BPM:

Variable 1: Source type SelectPedidoBpmAbstractSI which has a message with the following structure:

SelectPedidoJdbcMT_response -> 1.1

row -> 0.unbounded

Id -> 1.1 (part of row)

Material -> 1.1 (part of row)

Variable 2: Count of type integer

I have a container operation in which I get the value of Id field for the position but who has the Count variable, as I can do this with XPath in the container operation?

No way to do something like this:

/p1: SelectPedidoJdbcMT_response/row[[$Count]]/Id ??

Thank you very much.