Skip to Content
avatar image
Former Member

Mapping Header Values to Item Nodes

Using the graphical mapping editor, I need to map values from a source header level node to a target item level node for each item in the source structure.

eg.

<b>Source</b>

<HEADER>

<H1>HeaderValue1</H1>

</HEADER>

<ITEM>

<I1>Item1Value</I1>

</ITEM>

<ITEM>

<I1>Item2Value</I1>

</ITEM>

<b>Target</b>

<ITEM>

<H1>HeaderValue1</H1>

<I1>Item1Value</I1>

</ITEM>

<ITEM>

<H1>HeaderValue1</H1>

<I1>Item2Value</I1>

</ITEM>

If I map the source <ITEM> node to the target <ITEM> node and the <H1> and <I1> nodes as shown above, the <H1> node only appears on the first item. I need the <H1> node to appear for all target <ITEM> nodes.

Any assistance would be appreciated.

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    May 11, 2006 at 08:53 AM

    HI Mark,

    Use 'copy values' standard function and it should work.

    Regards

    Vijaya

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 11, 2006 at 08:53 AM

    Hi,

    Use CopyValues function to simply copy the value.

    Thanks,

    Prateek

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 11, 2006 at 08:56 AM

    Hi,

    You need to use, useOneAsMany node function.

    Regards,

    Smitha.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Try this:

      <header>---\

      <item>----- -<useOneAsMany><splitByValue>--- <header>

      <item>-----/

      Regards,

      Smitha.

  • avatar image
    Former Member
    May 11, 2006 at 09:26 AM

    Hi Briggs,

    This Mapping will Solve Ur Problem

    Source Structure:

    MT1 1..1

    Header 1..1

    H1 1..1

    Item 0..unbound

    L1 1..1

    Target Structure:

    MT2

    Item 0..unbound

    H1 1..1

    L1 1..1

    Mapping that solve Your Problem is :

    Item(source)-->Item(dest)

    H1(Source)>copy value (property=0)>H1(dest)

    L1(source)-->L1(source)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 11, 2006 at 09:30 AM

    Hi,

    Both CopyValue and UseOneasMany will be helpful in your case. But I think CopyValue will be more advantageous because less mapping funcions have to be used.

    And if you are using UseOneAsMany then the three parameters will be H1(context Header), L1(context input_DT, Level above header) and L1 (context header). For changing the context right click the node in Graphical mpping and change.

    Regards

    Suraj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 11, 2006 at 09:34 AM

    In My Mapping(Solution to ur Problem)

    MT1 and MT2 correspond to Root Elements....

    root 1..1

    Header 1..1

    H1 1..1

    Item 0..unbound

    L1 1..1

    Target Structure:

    root 1..1

    Item 0..unbound

    H1 1..1

    L1 1..1

    Mapping that solve Your Problem is :

    Item(source)-->Item(dest)

    H1(Source)>copy value (property=0)>H1(dest)

    L1(source)-->L1(source)

    Add comment
    10|10000 characters needed characters exceeded