In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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
Top Solution Authors