| Mike Watson 2004-11-26, 2:46 am |
| Hi Jan,
I am not too sure how you would do this in the standard functiods, but you
have the option to use custom XSLT, I would have a look at this.
Say your source and destination schemas have this structure you talk of
<Orderheader>
<OrderLine>
<OrderTextLine>
</OrderTextLine>
</OrderLine>
</Orderheader>
From within your BizTalk map, from the Advanced Functiods tab, add a
Scripting Functiod and then select Custom XSLT.
Paste the following into your editor:
<xsl:for-each select = "//Orderline" >
<xsl:variable name="ConcatOrdertextline">
<xsl:for-each select="child::*">
<xsl:value-of select="text()" />
</xsl:for-each>
</xsl:variable>
<Orderline>
<Ordertextline><xsl:value-of select =
"$ConcatOrdertextline"/></Ordertextline>
</Orderline>
</xsl:for-each>
Now attach a line from the output of your custom functiod to the Orderline
record.
This should work for you..
- Mike Watson
"Jan Inge" wrote:
> Hi
>
> I have a question regarding this functoide
>
> Inbound xml format:
> <Orderheader>
> <OrderLine>
> <OrderTextLine>
> </OrderTextLine>
> </OrderLine>
> </Orderheader>
>
> For each orderline I want to concatenate all the textlines to a single field
> in the source schema. This field is part of the same record as the orderline
> fields are mapped to. When I try to use the Cumulatice Concatenate functiode
> I get the following result when setting parameter 2 to the following values:
>
> 0: All the Ordertextlines are concatenate in the source field.
> 1: Sourcefield is empty
> 2: All the Ordertextlines are concatenate in the source field.
>
> Any ideas?
>
> Thanks
> Jan Inge
>
>
>
|