Hello All,
I am trying to if a function in my existing model to add one logic but unfortunately it will not give me the expected results. Could anyone please see the details in the attached example and guide me?
Solved! Go to Solution.
You need to change most of your AND to OR. Or you could use an IN function instead if it's always an exact match (which it is in this sample).
IF [Type] = "YELLOW" AND
(Contains([Item],"ACTIVITIES") OR
Contains([Item], "DATA HUB") OR
Contains([Item],"ADVANCED") OR
Contains([Item], "SMB") OR
Contains([Item], "PEOPLE") OR
Contains([Item], "GAMES") OR
Contains([Item], "PARKS"))
THEN "RED"
ELSE [Type]
ENDIF
IF [Type] = "YELLOW" AND
[Item] IN("ACTIVITIES", "DATA HUB","ADVANCED", "SMB", "PEOPLE", "GAMES", "PARKS")
THEN "RED"
ELSE [Type]
ENDIF
@Learner09
as @Christina_H pointed out, we should use Or instead of And and also modify the [Type] = "RED" part since it will return a boolen value 0 or 1.