Bobby Kuzma

I need to be able to selectively map elements from a particular N1-N5 block, based on the value of the N101 element to a flat file for use as the Shipto and billto information.

What's the easiest combination of functoids and black magic to make this happen



Re: BizTalk EDI and AS2 810 N1 element Mapping

Leonid Ganeline - MVP

As an example there is a Xslt Inline Script functoid working with N1-N5 segments.
It has no input links and one Output link to "Shipper" record.
<Shipper>
<xsl:for-each select="s0:N1Loop1[s0:N1/N101/text() = 'SH'][1]">
<Name>
<xsl:value-of select="s0:N1/N102/text()" />
</Name>
<Address>
<Line1>
<xsl:value-of select="s0:N3[1]/N301/text()" />
</Line1>
<Line2>
<xsl:value-of select="string(userCSharp:AddressConcat(string(N3[1]/N302/text()), string(s0:N3[2]/N301/text()), string(s0:N3[2]/N302/text())))" />
</Line2>
<City>
<xsl:value-of select="s0:N4[1]/N401/text()" />
</City>
<ProvinceCode>
<xsl:value-of select="s0:N4[1]/N402/text()" />
</ProvinceCode>
<PostalCode>
<xsl:value-of select="s0:N4[1]/N403/text()" />
</PostalCode>
<CountryCode>
<xsl:value-of select="s0:N4[1]/N404/text()" />
</CountryCode>
</Address>
</xsl:for-each>
</Shipper>