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

IF Statement - Is value within predefined list

HSuffolk
7 - Meteor

Hi all

 

I'm trying to incorporate a static defined set of values into an IF statement.

 

An illustrative example would go something like: IF [Field Name] CONTAINS {G11,G12,G13,G14,G15,G16,G17} THEN "Yes" ELSE "No" ENDIF

 

Is this possible? Is Alteryx able to work through a set of values in this way?

 

Thanks

 

H

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @HSuffolk 

 

Here is how you can do it. Add new value in the bracket as |G18

Workflow:

atcodedog05_0-1633001560933.png

 

Hope this helps : )

messi007
15 - Aurora
15 - Aurora

@HSuffolk,

 

Another way how you can do it

 

messi007_0-1633002446152.png

 

Attached the workflow,

Regards,

HSuffolk
7 - Meteor

Thank you for the responses. I've used the RegEx_Match and it works great.

 

Secondary question - is there a way to incorporate a dynamic list instead of defining G11, G12, etc? A reference to a list of values that calculate elsewhere in the workflow perhaps?

 

Thanks

 

H

atcodedog05
22 - Nova
22 - Nova

_

atcodedog05
22 - Nova
22 - Nova

Hi @HSuffolk 

 

You can do something like this.

 

Workflow:

atcodedog05_0-1633003386346.png

 

Hope this helps : )

Labels
Top Solution Authors