Skip to Content
0
Former Member
Sep 01, 2011 at 12:23 PM

Variables B1if "shortcut Xpath" as $msg

204 Views

I building a step with different B1i SQL call elements.

The Results come into a payload section f.e.<Payload Role="C" id="atom?">

All these payload section get a different id (atom1, atom2, ...), you can't give them a meaningfull name.

I tried to make a local variable with a menaingfull name that gives a schorcut for the xpath.

f.e. I create a variable DSparam with the following Xpath

/vpf:Msg/vpf:Body/vpf:Payload[./@Role='C' and ./@id='atom1']

and would lik to get value from it with the following :

<xsl:value-of>$vpDSparam/jdbc:ResultSet/jdbc:Row[jdbc:Code='EANCom']/jdbc:U_VALUE</xsl:value-of>

Just the same way you can use the System variable $msg.

The syntax of the Xpath is correct, because when I try the following, I get the correct value.

<xsl:value-of>/vpf:Msg/vpf:Body/vpf:Payload[./@Role='C' and ./@id='atom1']./jdbc:ResultSet/jdbc:Row[jdbc:Code='EANCom']/jdbc:U_VALUE</xsl:value-of>

I would like to make a variable that acts as an xpath shortcut, just like the $msg variable, in a scenario step and usable in different

atoms of the step.

Another strange thing is that if I try to choose one field of an atom , the variable doesn't get filled.

f.e. DSparam = >

/vpf:Msg/vpf:Body/vpf:Payload[./@Role='C' and ./@id='atom1']./jdbc:ResultSet/jdbc:Row[jdbc:Code='EANCom']/jdbc:U_VALUE 

while a variable refering to the payload S is evaluated correctly.

/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/BOM/BO/Document_Lines/row/BaseEntry

Edited by: IDE Francis on Sep 1, 2011 2:28 PM