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

Only run macro when meeting criteria else pass data on unchanged

PhillpJ
6 - Meteoroid

Hi -

 

The workflow attached is for a macro that identifies whether the current column header set has either null/blank value which would be labeled as F1, F2, F3, etc and moves on to the next row to see if all values are not null/blank in order to use that row as headers. How can I make sure that the macro is only used when the column headers contain F1, F2, F3? I'd like there to be a section where the data does not need to flow through the macro but I've tried a filter with true/falses which causes both true/false streams to run as a union tool is used to pull the input data even if the stream has 0 records. 

 

 

To sum it up: how can I set up a workflow with this macro to ensure data is passed through only if it meets criteria ELSE do not change the header.

 

Thank you - I'm open to all thoughts and ideas on how this is normally handled since I have the same issue with using my other macros!

 

 

6 REPLIES 6
Qiu
21 - Polaris
21 - Polaris

@PhillpJ 
Can you provide one sample input that should pass through the macro, and anther sampel input that should not pass the macro?

terry10
12 - Quasar

Add a filter before the macro with the condition you stated. If True, pass to the macro, if False, bypass the macro.  You can join or union the data after if desired.x.PNG

aatalai
15 - Aurora

also take a look at the conditional runner tool from crew macros 

 

http://www.chaosreignswithin.com/p/macros.html

 

condtional runner.PNG

PhillpJ
6 - Meteoroid

Here is the workflow with the macro - it is not possible to have the union after the macro since the value passed after the filter is a sum value and not the actual input. How can this be re-organized to avoid having the union pulling for both true and false when only one of those should contain input? 

 

In addition due to policy, I'm unable to use crew macros.

PhillpJ
6 - Meteoroid

Hi this has been solved on my own - thank you

terry10
12 - Quasar

@PhillpJ 

 

Could you share what your solution was? 

Labels
Top Solution Authors