ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

I am getting a parse error at chart 243 malformed if statement. What is wrong?

Marcegon
アステロイド

IF DATETIMEPARSE([End_date], "%Y-%m-%d") >= DATETIMEADD(DATETIMENOW(), -7, "days") THEN IF [Involvement] = "No Spend" OR [Involvement] = "Support only" THEN "Not required"
ELSEIF [Attachments] = "Budget" THEN "Completed" Else "Missing"
ENDIF

4件の返信4
NexBK
メテオール

There are two IF statements, but only one "ELSE" and one "ENDIF".

As shown in the picture, I recommend you to change "THEN IF" to "ELSEIF" in the middle.

 

NexBK_1-1660009498831.png

IF DATETIMEPARSE([End_date], "%Y-%m-%d") >= DATETIMEADD(DATETIMENOW(), -7, "days")
AND ([Involvement] = "No Spend" OR [Involvement] = "Support only") THEN "Not required" ELSEIF 
DATETIMEPARSE([End_date], "%Y-%m-%d") >= DATETIMEADD(DATETIMENOW(), -7, "days")
AND [Attachments] = "Budget" THEN "Completed" Else "Missing"
ENDIF

 

 

 

Marcegon
アステロイド

Thank you!  ELSEIF breaks the code for whatever reason.  Any other suggestion?

 

NexBK
メテオール

I revised what I posted a little while ago. Would you like to try again?

Marcegon
アステロイド

It worked!  Thank you so much

ラベル
トップのソリューション投稿者