Alteryx Designer Desktop Discussions

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

Advise on updating a control parameter based on a filter

Deano478
12 - Quasar

Hi All, 

 

I've been building a batch macro recently and I've hit a road block I'm trying to update my Filter/Control Parameter based on the Name.

 

essentially I will be adding another stream so if the Name does equal Dean Test I would like the control parameter to recognise this and do what will be in the new second stream once I add it.

 

I hope i explained this well as I feel like i potentially haven't any guidance on this would be really appreciated as I'm at a complete stump with this part

 

 

 

 

6 REPLIES 6
OllieClarke
15 - Aurora
15 - Aurora

Hi @Deano478 I'm not sure I fully understand you.

 

The setup you have in your screenshots means that whatever records are passed into the control parameter will update the filter based on the chosen field.

 

So if I pass in 

[Ctrl Field]
Dean Test
Ollie Test
Something Else


the batch macro will run once for each [Ctrl Field] and update the filter to just keep the records where (for example on the second run) [Name]='Ollie Test'

 

This list of names must be in a workflow in which the macro you've built will be added. It can't be within the batch macro, as macros only run inside other workflows. There's a great guide to batch macros available here: https://knowledge.alteryx.com/index/s/article/Getting-Started-with-Batch-Macros-1583461640393 

Does that help?

Deano478
12 - Quasar

Hey @OllieClarke I was thinking my explanation was great essentially What I'm hoping to do is if the document contains a name other than dean test etc.. it will pull of the false side of the filter and use this stream instead that why i wasn't sure about my config

 

OllieClarke
15 - Aurora
15 - Aurora

@Deano478 you can build off the false output of the filter tool, but you’re building your macro (currently) to just keep dean test data. 
it might help if you have an input and desired output

Deano478
12 - Quasar

@OllieClarke essentially what i'm trying to do is lets say you input a file and the client is OllieClarke Certain columns will be mapped to be certain things. However if the user inputs a file called DeanTest then the columns would map a different way etc.. so that why I'm trying to set the control parameter to pick up on the client name column and for the few variations I'll have nap the columns a different way hence my thinking with the filter and Control Param, but i'm at the block of trying to figure out of if the client name is different how do i tell the macro actually we want to map the Ollie Columns and not Deans columns

OllieClarke
15 - Aurora
15 - Aurora

@Deano478 you may not need a batch macro. If you've got a limited number of approaches, you can filter your data, then build the approach off the true. You can than build the other approach off the false (or if you've got multiple other approaches, repeat the filter process).
You can then union all approaches back together at the end if you want. Does that help?

 

image.png

Deano478
12 - Quasar

@OllieClarke cheers for taking the time to keep this thread active I think that WF you provided will be a good base point to try a different approach

Labels