Skip to Content

Use of function in mapping

Hello,

I need to put this logic in PI mapping.

If Qty = '0.000', then pass 'X' to delete_ind else pass ' ' to delete_ind.

How do I implement this? I had used equalA & ifelse function but it does not work.

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2009 at 08:25 AM

    If Qty = '0.000', then pass 'X' to delete_ind else pass ' ' to delete_ind.

                    constant[X]---> then
    Qty--------------->equalS------->if---->delete_ind (Target Field)
    constant[0.000]/ constant[ ]---> else
    
    

    'map constant0.000 to equalS

    constant[ ] to else

    choose if from function category Boolean

    equalS from function category Text

    Edited by: Kubra fatima on Sep 10, 2009 10:25 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2009 at 08:13 AM

    Hi,

    Use like this

    Qty

    \

    \ equalsA (Text equals) -- if then Constant 'X' -- delete_ind

    '0.000', / else Constant ' '

    Regards

    Suraj

    Edited by: S.R.Suraj on Sep 10, 2009 4:13 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2009 at 08:28 AM

    Hi,

    you can use Fix Value Mapping, which is a standard function.

    Conver 0.000 to X and set default value ans blank in case there is no match.

    Regards,

    Vikas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2009 at 08:37 AM

    yes you can also use FixValues standard function present under the function category Conversions

    Qty---->FixValues---->delete_ind
    

    double click on FixValues to provide key and Value

    Key       Value
    0.000     X
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2009 at 09:33 AM
    Qty  ------------------------                             
                                             | EqualsS(Text)| -- | IF | - Then -   Const('X') - |delete_ind| 
    Constant(0.000) ---------                                          Else - Const(' ')- |delete_ind|

    This will resolve your issue.

    Regards,

    Prasanna

    Add a comment
    10|10000 characters needed characters exceeded

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.