Alteryx Designer Desktop Discussions

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

Dynamic Filter-Macro

Sanjay_TVA
7 - Meteor

Hi,

 

I am trying to develop a dynamic filter macro in which both the condition and column name has to be dynamic.

 

The values are populating dynamically based on the control parameter but the column name also has to be chosen on the flow so I tried to use a drop down box from input to select the column name and give it to filter but it is not working.

 

P.S: The macro output should be zero because the conditions will be given in workflow but the values are populating in macro itself !!! 

 

Is there any other way to give the column name dynamically rather than hardcoding 😅

 

3 REPLIES 3
joshuaburkhow
ACE Emeritus
ACE Emeritus

@Sanjay_TVA 

 

One of the best tools you can use when building macros is the 'message' tool which will show you EXACTLY what is going through your macros and at which point. I did this: 

joshuaburkhow_0-1609411960184.png

Then when you go to the workflow to run it (with "Show all Macro Messages" turned on in Runtime settings) you'll see this: 

joshuaburkhow_1-1609412032874.png

 

That should give you a hint as to what the issue is 😉 

 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
Sanjay_TVA
7 - Meteor

Hi @joshuaburkhow ,

I'm new to Alteryx and macros and after seeing few YouTube videos and Alteryx blogs i tried it none of them suggested to use a message tool😅 Thanks for the Idea!

 

State.PNG

After using that also I'm not able to figure it out! My assumption is, it is considering it as string instead of a field name. Any way to resolve it ?

 

Also in the find and replace part is it possible to give the Find within field, Find value and Append  column as dynamically like this filter column so that for every newly added columns instead of new macros we can select the required conditions for find and replace!! This will be hugely Helpful for me to proceed further!!!!

 

fr.PNG

joshuaburkhow
ACE Emeritus
ACE Emeritus

Ok can you do me a favor and test this and see if it gives you the results you want? 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
Labels