Skip to Content

Mapping Problem

Hi Experts,

Need help in message mapping.

Here's the source

<MT_Source>
  <Name>Messi</Name>
  <Country>AU</Country>
  <Country>US</Country>
  <Country>MY</Country>
</MT_Source>

And expected target

<MT_Target>
  <Name>Juan</Name>
  <Status>OK</Status>
</MT_Target>

Country is 0-Unbounded. Status is based on the Country. If US exists, then Status is OK. Otherwise, NOT OK.

Example of NOT OK

<MT_Source>
  <Name>Neymar</Name>
  <Country>FR</Country>
  <Country>AU</Country>
  <Country>MY</Country>
</MT_Source>

Target

<MT_Target>
<Name>Neymar</Name>
  <Status>NOT OK</Status>
</MT_Target>

Is this possible with any built in function? Or just UDF?

Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 18, 2014 at 03:36 PM

    Hi Mark,

    It is possible with standard function.

    Status --> map with default (blank) --> Equals "US" --> If without else map Status to target

    regards,

    Harish

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Mark,

      The mapping of field status is right. you can see in target queue also value US is getting populated. i think the problem should be with split by value. or mapping of header segment.

      So please what the xml after transformation and check the splilt by value function again.

      regards,

      Harish

  • avatar image
    Former Member
    Jun 18, 2014 at 02:15 PM

    Hi Mark,

    Your question is not clear, can you provide more details.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Muneesh,

      Not sure why the sample XMLs didn't show up. Hope this one shows up now

      Source:

      <MT_Source>

           <Name>Messi</Name>

           <Details>

                <Country>ID</Country

                <Country>TH</Country>

                <Country>US</Country>

                <Country>DE</Country>

           <Details>

      </MT_Source>

      Target:

      <MT_Target>

           <Name>Messi</Name>

           <Status>OK</Status>

      <MT_Target>

      Status = OK if US country exists among the list of <Country>. Else, Status = NOT OK.