Skip to Content
author's profile photo Former Member
Former Member

Mapping question

I am trying to map Salary (From the Source - This is NOT A required field) to a target field TargetSalary(Target field - This is a Mandatory field).

When the source field Salary elment tag is not there the Mapping fails, because the target field is a Mandatory field.

To over come this I used the Exists function with Source Salary field, and if it returns false, then I am sending a constant 0 to the target field, but this never worked. could some one guide me please.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 04:39 PM

    Hi,

    We have done couple of similar scenario's , it works fine.

    we used sourcefield->Exist->Equals->Ifwithelse->Target

    In Equals we check source field with constant(true) value. If true pass Source field in IFWITHELSE function else pass any constant value.

    Hope it works,

    Cheers,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 04:41 PM

    Karen,

    you can debug using 'Display Queue' (After executin your mapping in IR Right Click on the field for which you want to see the queue contents ) function in message mapping to check if all the queue contents are as expected.

    Regards

    Anand

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 04:48 PM

    Hi Karen

    Your logic seems fine, maybe you can try something like length of source field is not greater than zero, then set a constant of 0 to target field.

    cheers

    Sameer

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Karen

      This is why i prefer doing the mapping using XSLT or Java, and not using message mapping. As i can write my own piece of code to handle any situation instead of depending on a tool. Maybe you can consider XSLT or Java as well.

      cheers

      Sameer

      PS: The XSLT code for your current requirement is very easy.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.