Alteryx Designer Desktop Discussions

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

Error Message

chilby
6 - Meteoroid

Hello! 

 

New Alteryx user here with a question:

 

I am trying to write a formula that will analyze all my subscription IDs for Null or Non-null and if any of them return a unique 18 digit ID, I want the row's formula to state "Sub Found" and if all sub ID columns are null, then return "None Found" however it looks as if I am getting a syntax error. 

the metadata for all sub IDs is Vstring. 

 

Please help, thank ya!

 

chilby

 

chilby_1-1617926624531.png

 

chilby_0-1617926599114.png

chilby_0-1617926977416.png

 

 

4 REPLIES 4
Luke_C
17 - Castor

Hi @chilby 

 

Remove all of the 'IF's other than the first row and it should work. IF initiates an if statement, it does not need to initiate each clause the if statement is evaluating. 

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @chilby,

 

I'd take a slightly different approach to your formula rather than having so many AND statements, but both would work!

 

IF
MAX(
[Field1],
[Field2],
[Field3]
	) = Null()
THEN 'None Found'
ELSE 'Sub Found'
ENDIF

 

Checking what the max value is within your fields, if the max is Null we can determine all fields = null.

Jonathan-Sherman_0-1617928191989.png

 

I've attached my workflow for you to download if needed.

 

Kind regards,

Jonathan

 

chilby
6 - Meteoroid

Thank you very much @Luke_C

apathetichell
18 - Pollux

Quick FYI - another reason your initial formula was generating that error was that your last clause before endif was ELSEIF.

 

ELSEIF requires a THEN and finally an ELSE.

 

Had you used ELSE instead of ELSEIF your original may have worked.

 

Labels