I receive an error message "Contains requires 2 or 3 arguments" for the below formula:
IF CONTAINS([CREDIT_RATING],"T1","t1","V8","in","ST","f1","t5","Y","NR","t4","fa","M9","I1","CC","B9","V9","LS","I0","NN","F","l1","L0","G0","A0","4F","L3") && ([CARD_STATUS] = 'Active') THEN "Check"
ELSE "OK"
ENDIF
Does anyone know how to resolve this? I believe the issue is that I am asking to check multiple arguments (as this works when I only check one argument i,e "T1". Is there a formula for multiple arguments?
Solved! Go to Solution.
Hi @jolenecox unfortunately the CONTAINS() function can only look for 1 argument, so you'll have to rewrite the formula like this:
IF (
CONTAINS([CREDIT_RATING],"T1")
OR CONTAINS([CREDIT_RATING],"t1")
OR CONTAINS([CREDIT_RATING],"V8")
OR CONTAINS([CREDIT_RATING],"in")
OR CONTAINS([CREDIT_RATING],"ST")
OR CONTAINS([CREDIT_RATING],"f1")
OR CONTAINS([CREDIT_RATING],"t5")
OR CONTAINS([CREDIT_RATING],"Y")
OR CONTAINS([CREDIT_RATING],"NR")
OR CONTAINS([CREDIT_RATING],"t4")
OR CONTAINS([CREDIT_RATING],"fa")
OR CONTAINS([CREDIT_RATING],"M9")
OR CONTAINS([CREDIT_RATING],"I1")
OR CONTAINS([CREDIT_RATING],"CC")
OR CONTAINS([CREDIT_RATING],"B9")
OR CONTAINS([CREDIT_RATING],"V9")
OR CONTAINS([CREDIT_RATING],"LS")
OR CONTAINS([CREDIT_RATING],"I0")
OR CONTAINS([CREDIT_RATING],"NN")
OR CONTAINS([CREDIT_RATING],"F")
OR CONTAINS([CREDIT_RATING],"l1")
OR CONTAINS([CREDIT_RATING],"L0")
OR CONTAINS([CREDIT_RATING],"G0")
OR CONTAINS([CREDIT_RATING],"A0")
OR CONTAINS([CREDIT_RATING],"4F")
OR CONTAINS([CREDIT_RATING],"L3")
)
AND ([CARD_STATUS] = 'Active')
THEN "Check"
ELSE "OK"
ENDIF
I'm assuming that the commas in your contains were working as an OR rather than an AND.
Hope that helps,
Ollie
Great, works perfectly. Thanks Ollie!
Thanks @messi007 - as you can tell I'm just warming up with Alteryx!