IF then ELSE Logic
edited June 2021 in General discussion
Can I write IF (Some Condition)THEN (Valid) Else (Invalid) Logic in Aperture? So That in the Output Result set I can view both Valid and Invalid Result set
Josh Boxer Administrator
If I am understanding correctly then you want to use Transform to add a new column to your data. This new column will use a custom function that ends with the default function 'If then else'
I say "ends with" as it helps to work backwards when building this logic.
- Whatever you want to be returned when Valid you put in the <Condition met result> field, so either True or 1 or the <input value>, etc.
- Whatever you want to be returned when Invalid you put in the <Else> field
- The Condition field is expecting a True/False value, so you would feed into it another function, which is checking the condition such as Contains/Equals/Greater than etc.
- (Note that you can click the green + to add additional conditional checks to return a different value when that condition is true)
Assuming you return True/False or 1/0 into this new column, you can now use the Workflow step Split to filter the two sets of Passing and Failing rows
Hope that helps1
Thank you so much Josh. Really appreciate your help1
Hey! You will be signed out in 60 seconds due to inactivity. Click here to continue using the site.
No problem, there are a couple of relevant examples using If then else in the Functions library
Example returning True/False https://community.experianaperture.io/discussion/568/convert-boolean
Example returning standardised value vs error message https://community.experianaperture.io/discussion/579/standardise-country