How can I convert the expression below (that works) to something like this:
if Contains ([FileName],("78","36","13","20","04")) then "X" else "A" endif
if Contains([FileName],"78") then 'X'
elseif Contains([FileName],"36") then 'X'
elseif Contains([FileName],"13") then 'X'
elseif Contains([FileName],"20") then 'X'
elseif Contains([FileName],"04") then 'X'
elseif Contains([FileName],"04") then 'X'
else "A"
endif
Solved! Go to Solution.
Hey @hellyars
You can use a Regex_CountMatches formula to simplify the If statement.
IF REGEX_CountMatches([FileName], "78|36|13|20|04")=1 THEN "X" ELSE "A" ENDIF
If this solves your issue please mark the answer as correct, if not let me know!
Thanks!
Phil