How to convert a value using if-then-else?

Marco_13112001Marco_13112001 Super Learner
edited July 5 in General discussion

Hi,

I've created the following function to convert an input to zero if the input equals to null and to return the value if it is not null. However, the if-then-else step states that function must return True or False which is not the output required. Could you please have look into it and advise the way forward.


Many thanks in anticipation.


Tagged:

Answers

  • Josh BoxerJosh Boxer Administrator
    edited July 5

    Hi Marco

    Is this Function a a rule within the Validate step? If so it is expecting the output to be True/False. In v2.7.6 we added the ability to Ignore values such as Nulls when using Validate https://community.experianaperture.io/discussion/836/aperture-data-studio-2-7-6


    If it is a Transform that you are trying to achieve then I think you can simplify "convert an input to zero if the input equals to null and to return the value if it is not null" to a single function:

    Your function does the first bit, checking null and returning zero, but returns true/false for the Else rather than the value. You have selected your Variable rather than 'Input' column.

    Hope this helps

Sign In or Register to comment.