Alteryx Designer Desktop Discussions

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

MODIFIED CONTAINS IN-LIST MACRO

bb213
8 - Asteroid

This is a macro that @MarqueeCrew  made to find an item in a list.  However, the macro as it exists does not suit my purposes.  I need the "Target Terms" to be an optional field in my workflow. I need to modify the macro so that if the "Target Terms" are left blank, all the records are allowed to pass. It's driving me crazy.

 

Thanks. 

5 REPLIES 5
AbhilashR
15 - Aurora
15 - Aurora

Hi @bb213, judging by the macro's functionality, it looks like it filters the dataset based on the values provided by the user. Not necessarily getting into its inner workings, would the Filter tool work in what you are looking to do?

AbhilashR_0-1587928850055.png

 

bb213
8 - Asteroid

 @AbhilashR What you just showed me is a simple filter.  I need the macro edited to give me the functionality i described. 

AbhilashR
15 - Aurora
15 - Aurora

Hi @bb213, Is this the output you are looking to get? i.e. the user doesn't enter any value in the Target Term(s) field and yet the workflow passes the data out?

AbhilashR_0-1587932240096.png

If yes, then delete the Error Message tool inside the macro and save it. The Error Message macro was meant to force the user to type values, but since you looking to keep it optional, it serves no purpose.

AbhilashR_1-1587932498895.png

Let us know if this helps.

bb213
8 - Asteroid

if target terms is blank, every single record should pass through.  If target terms is populated, it should work as a the filter was designed. 

AbhilashR
15 - Aurora
15 - Aurora

@bb213 - I modified the macro to pass every record if the Target Field(s) is blank, or function as a filter if the user types-in relevant value.

AbhilashR_0-1587935652899.png

Solution attached for your reference.

Labels