Forum Discussion
You can try something like this.
$Data.IDOC.A1.get('@VW') == "F" ? $Data.IDOC.A1['@VW'].get('NO', $Data.IDOC.B1['@VW'].NP) : null
If this won’t work then, you can send me sample data so I can have better understanding of the problem.
hi, it did not work.
below is the xml:-
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<IDOC BEGIN="1">
<K01 SEGMENT="1">
<CURCY>EUR</CURCY>
<RECIPNT_NO>4455566</RECIPNT_NO>
</K01>
<ED SEGMENT="1">
<QUALF>014</QUALF>
<ORGID>A</ORGID>
</ED>
<ED SEGMENT="1">
<QUALF>009</QUALF>
<ORGID>002</ORGID>
</ED>
<A1 SEGMENT="1">
<VW>ZB</VW>
<NP>WEE</NP>
<NO>55666</NO>
</A1>
<A1 SEGMENT="1">
<VW>GS</VW>
<NP>0000070252</NP>
<NO>334455</NO>
</A1>
<A1 SEGMENT="1">
<VW>LF</VW>
<NP>0000070252</NP>
<RAS>E</RAS>
<NO>23334455</NO>
</A1>
<A1 SEGMENT="1">
<VW>LS</VW>
<NP>0000070252</NP>
<NO>55666</NO>
</A1>
</IDOC>
</Data>
so in the above example, it should give 23334455 and if <NO>
does not exists then 0000070252.
If you believe this is an error in the Snap, submit a ticket to SnapLogic Support at support@snaplogic.com.