cancel
Showing results for 
Search instead for 
Did you mean: 

Access to results after for-each atom

ricardo_renteria2
Participant
0 Kudos

Hi all,

I have a integration scenario of invoices. Because of the items of the invoice manage serial numbers I need to query the SysSerial of each one in the receiver system in order to match with the serial number given. This process is achieved using a for-each atom, but the problem I have is how to access the result of each query, because the process generate a <bfa:unbranch> node and the xPath I try to use doesn't work.

The

Let's see:

the message after the for-each looks like this:

This is the process flow:

In atom4 I call for results of for-each

but the xPath doesn't work.

How can I access the node <SysSerial>?

Accepted Solutions (1)

Accepted Solutions (1)

ricardo_renteria2
Participant
0 Kudos

Here an answer from my colleague Bastian S., I tested in my scenario and it works fine!

Please don’t use the graphical flow for your for-each, do it in xslt instead

Here is an example of a transform atom3, the sql statements are separated by semicolon:

<sql>
   <xsl:for-each select="$externalSalesDocumentDataQuery_sync/Item">
      <xsl:variable name="recipientid" select="./Product/RecipientID"></xsl:variable>
       SELECT "ItemCode", "UgpEntry" FROM "OITM" WHERE "ItemCode"='<xsl:value-of select="./Product/RecipientID"/>'; ==>Note the final ; in order to separate the sql sentences!
   </xsl:for-each>
</sql> 

In the sql atom, you need to reference to this transformation atom

As result you’ll get the complete result of the sql statement and you’ll have access. From processing point of view it’s much more effective, please try to avoid these graphical for-each constructs if you can do it within xslt.

Best regards Bastian.

Answers (0)