BizTalk Server General - Mapping a repeating field

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > March 2005 > Mapping a repeating field





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 Mapping a repeating field
Jeff Wessling

2005-03-01, 5:55 pm

I'm trying to map repeating fields a more static structure, something like
this:

<Identifier>
<Type>SSN</Type>
<Value>123456789</Value>
</Identifier>
<Identifier>
<Type>DriversLicense</Type>
<Value>WA987654321</Value>
</Identifier>

-- to --

<IdentifierCollection>
<SSN>123456789</SSN>
<DL>WA987654321</DL>
</IdentifierCollection>

I'm using a logical "Equal" functiod to test the Type and then a "Value
Mapping" functoid to copy over the Value, however I'm ending up with the
following:

<IdentifierCollection>
<SSN>123456789</SSN>
</IdentifierCollection>
<IdentifierCollection>
<DL>WA987654321</DL>
</IdentifierCollection>

I've tried adding in the "Looping" functoid, but that doesn't seem to be
helping. Anyone have any idea how to fix this?

Thanks,
Jeff


ramani viswanathan

2005-03-01, 5:55 pm

Jeff

1. Create the two field elements SSN and DL on the target schema with
maxoccurs = unbounded.
2. In the map,connect a looping functoid from identiffer to SSN and
identifier to DL.
3. create two logical equal functoids with values SSN and Drivers License
respectively.
3. connect these functoids from identifier to SSN and identifier to DL.
4. connect value to SSN and value to DL.

This should produce your desired output.

Ramani

"Jeff Wessling" wrote:

> I'm trying to map repeating fields a more static structure, something like
> this:
>
> <Identifier>
> <Type>SSN</Type>
> <Value>123456789</Value>
> </Identifier>
> <Identifier>
> <Type>DriversLicense</Type>
> <Value>WA987654321</Value>
> </Identifier>
>
> -- to --
>
> <IdentifierCollection>
> <SSN>123456789</SSN>
> <DL>WA987654321</DL>
> </IdentifierCollection>
>
> I'm using a logical "Equal" functiod to test the Type and then a "Value
> Mapping" functoid to copy over the Value, however I'm ending up with the
> following:
>
> <IdentifierCollection>
> <SSN>123456789</SSN>
> </IdentifierCollection>
> <IdentifierCollection>
> <DL>WA987654321</DL>
> </IdentifierCollection>
>
> I've tried adding in the "Looping" functoid, but that doesn't seem to be
> helping. Anyone have any idea how to fix this?
>
> Thanks,
> Jeff
>
>
>

Jeff Wessling

2005-03-01, 5:55 pm

Thanks! This was just about what I had done previously and I was about to
respond with that, but then I changed the max occurs to 'unbounded' like you
suggested and *BAM* it worked.

Thanks for the help and the reminder that I need to follow all steps. :-)

"ramani viswanathan" <ramaniviswanathan@discussions.microsoft.com> wrote in
message news:0AC7EF72-16AA-44F6-812D-ADA8CD9F3EC1@microsoft.com...[vbcol=seagreen]
> Jeff
>
> 1. Create the two field elements SSN and DL on the target schema with
> maxoccurs = unbounded.
> 2. In the map,connect a looping functoid from identiffer to SSN and
> identifier to DL.
> 3. create two logical equal functoids with values SSN and Drivers License
> respectively.
> 3. connect these functoids from identifier to SSN and identifier to DL.
> 4. connect value to SSN and value to DL.
>
> This should produce your desired output.
>
> Ramani
>
> "Jeff Wessling" wrote:
>


Jeff Wessling

2005-03-01, 8:47 pm

Interesting I thought I tried that... is the Looping functoid used? Does the
mapping you suggest look like this?

TYPE ------[equals: SSN]------[ValueMap-Flat]--------SSN
VALUE------------------------------/


"Jon Flanders[DevelopMentor]" <jfland@develop.com> wrote in message
news:u5%23X5nqHFHA.1948@TK2MSFTNGP14.phx.gbl...
> Hi Jeff - here is a sample that does exactly that.
>
> It uses the Equal functoid chained with the value mapping (flattening)
> functoid to check the value of the Type node and output the text of the
> value node as appropriate.
>
> --
> Jon Flanders [DevelopMentor]
> http://staff.develop.com/jfland/
> http://www.develop.com/courses/biztalk
> "Jeff Wessling" <jeff.wessling@qualifacts.com> wrote in message
> news:uXcx%23lpHFHA.3936@TK2MSFTNGP10.phx.gbl...
>
>
>



Jon Flanders[DevelopMentor]

2005-03-01, 8:47 pm

No - no looping functoid - just the value mapping (flattening) - the
flattening is the key to take multiple input elements and map them down to a
single output element.

--
Jon Flanders [DevelopMentor]
http://staff.develop.com/jfland/
http://www.develop.com/courses/biztalk
"Jeff Wessling" <jeff.wessling@qualifacts.com> wrote in message
news:ONX5qZsHFHA.2356@TK2MSFTNGP12.phx.gbl...
> Interesting I thought I tried that... is the Looping functoid used? Does
> the mapping you suggest look like this?
>
> TYPE ------[equals: SSN]------[ValueMap-Flat]--------SSN
> VALUE------------------------------/
>
>
> "Jon Flanders[DevelopMentor]" <jfland@develop.com> wrote in message
> news:u5%23X5nqHFHA.1948@TK2MSFTNGP14.phx.gbl...
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com