BizTalk Server General - Cumulative Concatenate Functoide

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > November 2004 > Cumulative Concatenate Functoide





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Cumulative Concatenate Functoide
Jan Inge

2004-11-25, 7:46 am

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



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
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com