Hi Frederik,
in the SQL call atom there is an option to take the SQL code from a previous XFORM atom.
I always use this option if I want to fill any values from variables.
You only need to enter the XPath, where you're SQL statement can be found (without leading #).
I attached a screenshot, where I prepared the SQL statement including variables in atom7:
/vpf:Msg/vpf:Body/vpf:Payload[./@id='atom7']/SQL
In XFORM atom7, there is following segment <SQL>:
xsl:template name="transform"><SQL xmlns="">SELECT DocEntry, DocNum, NumAtCard FROM ORDR WHERE NumAtCard LIKE '%<xsl:value-of select="concat($vpdocentry,'*',$vpdocnum)"/>%'</SQL></xsl:template>
Best regards
Bastian