We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Issue with If Statement

henrywqral
5 - Atom

Hi everyone,

 

I am currently receiving the following error message on a custom formula: "Malformed If Statement".

 

The statement can be found below:

IF Contains([Status], "Complete") THEN "Complete"
ELSE IF Contains([Status],"Received") THEN "Received"
ELSE IF Contains([Status],"Hold") THEN "Received"
ELSE "Cancelled" ENDIF

 

It says Parse error at char(221). [Status] field is in V_String. If anyone can explain why this If statement is not functioning I would appreciate all input.

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

Hey @henrywqral, if you remove the spaces between your ELSE and IFs so they’re just ELSEIF, does that help?

henrywqral
5 - Atom

I believe this fixed this issue I was having. Thank you!

Labels
Top Solution Authors