Alteryx Designer Desktop Discussions

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

Multiple conditions using same results column

garaya
7 - Meteor

Hi,

How I can execute two or more conditional formulas that can concatenate output in the same results column?

I need to validate with these two conditional statements and output the result in one column.

 

1st Condition

IF Left([Short Desc], 1) != "X" THEN "Descriptions must begin with X" ELSE "" ENDIF

 

2nd Condition

IF RIGHT([Short Desc],1)!="Y"

AND RIGHT([Short Desc],1)!="Z"

THEN "Check suffix, it is Wrong"

ELSE ""

ENDIF

 

Example

Short Desc

Expected Result

X Test Description Y

Valid!

X Test Description

Check suffix, it is Wrong

Test Description

Descriptions must begin with X + Check suffix, it is Wrong

Test Description Z

Descriptions must begin with X

 

Attached is the sample workflow

3 REPLIES 3
kelsey_kincaid
12 - Quasar

You're close! Instead of doing the formula tools separately, consider doing them back to back and creating separate columns for them. Then  you can consolidate the results into a single field within the formula tool, and drop your extra 'working' columns using a select tool. I've attached an example.

ValidationTool1.PNGValidationTool2.PNG

garaya
7 - Meteor

Hi Kayers,

 

Thanks a lot! This works perfect!

I put everything under just one formula tool.

 

image.png

image.png

kelsey_kincaid
12 - Quasar

@garaya Even better!

Labels