Hi,
Why wont it work? what am I doing to the end?
if REGEX_CountMatches([PAYEE ADDR 1] AND [PAYEE ADDR 2], "[A-Za-z]") > 0 then "Text"
elseif REGEX_CountMatches([PAYEE ADDR 1] AND [PAYEE ADDR 2], "[0-9]") > 0 then
"Int" else endif
thanks
Solved! Go to Solution.
Hi @Hi2023 , you are missing something between the 'else' and 'endif'. The formula requires that you put something in the 'else' clause so it knows what to return if neither of your conditions are true. You could use 'else null() endif' to return NULL if neither condition is true.
@Hi2023 you need to re-write the formula like below
IF REGEX_CountMatches([PAYEE ADDR 1], "[A-Za-z]")> 0 AND REGEX_CountMatches([PAYEE ADDR 2], "[A-Za-z]") > 0 Then "Text"
elseif REGEX_CountMatches([PAYEE ADDR 1], "[0-9]")> 0 AND REGEX_CountMatches([PAYEE ADDR 2], "[0-9]") > 0 Then 'Int' Else
Null()
EndIf
I read it as [PAYEE ADDR 1] + [PAYEE ADDR 2] (concatenated string) - either way your problem is the AND - AND is a boolean term. You can use it in Boolean compare - in strings you can use +...
How would I write this to see for the text column- I wanted to check if there was ANY numbers in the column versus NO numbers in the column
But I need this for PAYE ADDR1
AND
PAYE ADDR 2
@Hi2023 Do you need to I check both on the same formula, if yes as @apathetichell @suggested concatenate both fields then apply the formula
ie [PAYEE ADDR 1] + [PAYEE ADDR 2]
use the workflow I uploaded. Select the fields you need in the multi-field.