Skip to Content
avatar image
Former Member

conditional mapping

hi all,

nice meeting u people again with a new thread.

here i am having three fields for ex:A,B,C. both the three fields have different different values. like A= cat B= 1 C= apple

dog 2 mango

rat 3 guava

here i have to map these fields to the receiver that if value of A occurs as 'cat' then the value of B must come as '1' and C as 'apple'.

when value of A occurs as 'dog' then the values of B and C must be as '2' and 'mango' respectively. similarly for A=rat also .

currently i am using message mapping . will any one help me how to proceed in this situation .

thanks in advance. please help me

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Aug 01, 2007 at 10:42 PM

    Hi Aaula,

    Your target structure should be the same and you can use the one to one mapping for this.

    Like the below.

    XYZ ( )

    -- A

    -- B

    -- C.

    Thanks,

    Jane.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 01, 2007 at 10:44 PM

    Ramana,

    Your condition is not clear. Could you give us the source and target structure and let us know the condition.

    Best regards,

    raj.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 01, 2007 at 10:46 PM

    Hello,

    From your question,

    Assuming Sender is sending only value A and you have the values for B and C and considering A values are limited then you can do this using Value Mapping.

    Value Mapping:

    cat 1apple

    dog 2mango

    rat 3guava

    And then use substring operation for B and C.

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 01, 2007 at 10:48 PM

    Aavula,

    Use the standard if else function in mapping. For the field 'B' you map as If A=cat then B=1 else > if A=dog then B=2 > else B=3 (so combinaiton of two if else) and similarly for the field c.

    Regards,

    ---Satish

    Add comment
    10|10000 characters needed characters exceeded