Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

IF Contains OR

CRogers22
8 - Asteroid

Hello All,

 

I'm working to create a formula to search for key words. But I'm doing something wrong. I'm getting Parse Error Malformed If Statement. It doesn't show any breaks in the formula so looks as if it should work.

 

IF Contains ([Customer Note 1], "711")
OR IF Contains([Customer Note 1], "a walker")
OR IF Contains([Customer Note 1], "access aisle")
OR IF Contains([Customer Note 1], "accessibility")
OR IF Contains([Customer Note 1], "accessible branch")
OR IF Contains([Customer Note 1], "accessible parking")
OR IF Contains([Customer Note 1], "accessible routes")
OR IF Contains([Customer Note 1], "accessible signs")
OR IF Contains([Customer Note 1], "accommodation")
OR IF Contains([Customer Note 1], "accommodation requests")
OR IF Contains([Customer Note 1], "accommodations")
OR IF Contains([Customer Note 1], "ada")
OR IF Contains([Customer Note 1], "alternative service")
OR IF Contains([Customer Note 1], "american disabilities act")

THEN 'Yes' else 'No'
Endif

 

 

Any help would be appreciated. 

3 REPLIES 3
alexnajm
18 - Pollux
18 - Pollux

You don't need "IF" after each "OR"!

 

IF Contains ([Customer Note 1], "711")
OR Contains([Customer Note 1], "a walker")
OR Contains([Customer Note 1], "access aisle")
OR Contains([Customer Note 1], "accessibility")
OR Contains([Customer Note 1], "accessible branch")
OR Contains([Customer Note 1], "accessible parking")
OR Contains([Customer Note 1], "accessible routes")
OR Contains([Customer Note 1], "accessible signs")
OR Contains([Customer Note 1], "accommodation")
OR Contains([Customer Note 1], "accommodation requests")
OR Contains([Customer Note 1], "accommodations")
OR Contains([Customer Note 1], "ada")
OR Contains([Customer Note 1], "alternative service")
OR Contains([Customer Note 1], "american disabilities act")

THEN 'Yes' else 'No'
Endif

CRogers22
8 - Asteroid

Thank you!

alexnajm
18 - Pollux
18 - Pollux

Happy to help!

Labels
Top Solution Authors