Skip to Content
0
Former Member
Jan 13, 2017 at 05:24 AM

Variable from a previos SQL Call always comes blank despite it has a value

138 Views Last edit Aug 22, 2017 at 08:52 AM 2 rev

Hi Everyone.

I'm quite new on B1IF and I have this strange problem that I'm sure that you guys could help me on this:

I'm working on a Scenario step where I need to do SQL Call and then put that result into a variable to use it in another SQL Call. When I do a XSL transformation this is working and printing the correct value:

<vDocFROMSAPCardCode>

<xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@id='atom9']/jdbc:ResultSet/jdbc:Row/jdbc:CardCode"></xsl:value-of>

</vDocFROMSAPCardCode2>

This will print the value, However if I try to assign this to a Local Variable called vFROMSAPCardCode:

/vpf:Msg/vpf:Body/vpf:Payload[./@id='atom20']/vDocFROMSAPCardCode2

Always comes empty. I need to use the result of that query in another query but always comes blank, despite the logic seams to be OK.

# SELECT T0."DocNum", T0."DocEntry", T0."CardCode", T0."NumAtCard"  FROM ORDR T0 WHERE T0."CardCode" =  '$vFROMSAPCardCode' 

Does anyone know what am I missing here? Or how to use the result of a previous query into antoher one?

BTW.

atom9 Is the original query that it's working fine

atom20 is the XSL transformation after the query is executed.