Skip to Content

FixValues when input value is not mapped

Hi experts,

I have a maybe simple but urgent question.

I have a field with fixValues:

input output

d1--> cr1

d2 -->cr2

when input is d1 or d2 it's all ok.

When input is another value the output is blank, but in this case I need that output value is equal to input value.

Is possile?

thanks

Fabio

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 02, 2011 at 04:16 PM

    Hi Fabio,

    which PI version you have?

    In PI 7.11, in a FixValue, above your two columns (source, target), you have three options for "Behaviour if Lookup Fails":

    1. Use Key

    2. Use Default Key

    3. Throw Exception.

    choose option 1.

    If you have not this option, in default value put something like "XXX_NOVALUE_XXX". And after your FixValue use a "IfS" to check if value returned by your FixValue is this constant, If yes, use source value, if not use returned values. So just add a "IF", easy to do.

    regards

    Mickael

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      mi Pi is older than 7.11, I do not have options for "Behaviour if Lookup Fails".

      Because I was in very hurry I've written a simple UDF, but for future use I'll use default value and ifS.

      Thanks!!

      Fabio

  • Dec 02, 2011 at 04:19 PM

    >>but in this case I need that output value is equal to input value

    under option "Behaviour if lookup fails" -> "use key" in fix value function

    Add comment
    10|10000 characters needed characters exceeded