Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Nested if formula

PrashantJP
7 - Meteor

Hi Community,

 

Could you please help me with the following nested if statement for formula function? I am getting error when I run the below

 

if [Approval Status Code (Prop)]="Approved" then "Proposal in Approved state"

else

if [Approval Status Code (Prop)]= "Draft" then "Proposal in draft state"

else

IF [Approval Status Code (Prop)]= "Pending Approval" then "Proposal pending for approval"

else

IF [Approval Status Code (Prop)]= "Complete" then "Proposal complete"

else

"Need to raise proposal"

endif

 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @PrashantJP 

 

Change like below, it should work.

 

if [Approval Status Code (Prop)]="Approved" then "Proposal in Approved state"

elseif [Approval Status Code (Prop)]= "Draft" then "Proposal in draft state"

elseif [Approval Status Code (Prop)]= "Pending Approval" then "Proposal pending for approval"

elseif [Approval Status Code (Prop)]= "Complete" then "Proposal complete"

else "Need to raise proposal"

endif

 

Workflow:

atcodedog05_0-1627458790962.png

 

 

Hope this helps : )

Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @PrashantJP ,

 

You have to write "ELSEIF" instead of having "else" on one row and "if" on another row.

PrashantJP
7 - Meteor

Thanks a ton 🙂

 

Labels
Top Solution Authors