Alteryx Designer Desktop Discussions

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

IF AND THEN ELSEIF AND THEN TRUE ELSE FALSE ENDIF parse error - what did I do wrong?

MaryCann
8 - Asteroid

MaryCann_0-1652279411552.png

I also tried this one:  

MaryCann_1-1652279435782.png

 

This is using the Filter tool.  

 

Also - it sucks being a newby and learning all this stuff that everyone else thinks is easy!

 

9 REPLIES 9
Luke_C
17 - Castor

Hi @MaryCann 

 

The filter tool evaluates things to be true or false. Your formula should just be something like:

 

([SERVICE ID] > 19 and [SERVICE ID] < 26)

OR

([SERVICE ID] > 119 and [SERVICE ID] < 225)

 

Your existing formula would work to add a new field to flag True/False if used in a formula tool. 

IraWatt
17 - Castor
17 - Castor

Hey @MaryCann, Your bottom formula looks fine just the case is wrong on the first element, should be [SERVICE ID] (case in important)

MaryCann
8 - Asteroid

Hi @IraWatt  - OMG!!!  Such an easy oversight.  THANK YOU!  

 

IraWatt
17 - Castor
17 - Castor

No worries glad it worked for you ! :)

MaryCann
8 - Asteroid

ACH!  Next Parse Error!  Okay - what about this: 

MaryCann_0-1652281955196.png

 

 

Luke_C
17 - Castor

Hi @MaryCann 

 

Assuming the data is set to be numeric, what you have should work:

Luke_C_0-1652282258711.png

 

 

IraWatt
17 - Castor
17 - Castor

@MaryCann that error is because its string data type. Add a select tool before it and set it to an integer: 

IraWatt_0-1652282499510.png

 

Shifty
12 - Quasar

Nice solve, @IraWatt 

IraWatt
17 - Castor
17 - Castor

Thankyou Mr @Shifty 

Labels