Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

IF Statement Parse Error

codybentley
6 - Meteoroid

Hello, I get the following error when trying to run this formula.  I have the Output Column selected as "Site Formatted" which is formatted with Integer 16.

 

"Parse Error at char(298): Malformed If Statement (Expression #1)"

 

if [Site Formatted]=10 then 3810

else if [Site Formatted]=12 then 3812

else if [Site Formatted] = 14 then 3814

else if [Site Formatted] = 22 then 3822

else if [Site Formatted] = 36 then 3836

else if [Site Formatted] = 38 then 3838

else if [Site Formatted] = 41 then 3841

else [Site Formatted] endif

 

Any idea what I might be doing wrong?

2 REPLIES 2
PeterP
8 - Asteroid

Hey @codybentley 

 

You're updating the existing Site Formatted Column right? Try putting "elseif" with no space instead of "else if". Let me know if that works and if you can select this as a solution for others to see as well!

 

Thanks,

Peter

codybentley
6 - Meteoroid

Thanks @PeterP! That was exactly it.  Pesky space

Labels