Skip to Content
author's profile photo Former Member
Former Member

Variables B1if "shortcut Xpath" as $msg

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 07, 2012 at 07:36 AM

    Hi,

    i want to know how to data come from Result set.

    My variable is that

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

    that i set in local variable

    <xsl:variable name="vpvar" select="/vpf:Msg/vpf:Header/vpf:Variables/vpf:var[./@id=&apos;var&apos;]/@value"></xsl:variable>

    this is XML syntax variable.

    i have used this following function to get the data from result set,

    <xsl:value-of select = "$vpvar/jdbc:ResultSet/jdbc:Row/jdbc:U_DSTRB" ></xsl:value-of>

    stil No data come from result set.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.