We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to run just one part of the workflow at a time??

Gandalf_NotGrey
8 - Asteroid

Hello Everyone.

I have a question related to a workflow I am working on.

This is an app where the user input two fields, based on which the workflow runs.

The input that user gives, can belong to one of the five categories and based on that input, the result comes from that specific part of the workflow.

Now, the challenge that I am having is that, even when the user inputs a number from category 1, remaining 4 categories still run with no data, in turn slowing down the entire workflow.

Is there a way for me to run just one part of the workflow, based on the user input?

Thanks so much for your assistance with this.

12 REPLIES 12
alexnajm
18 - Pollux
18 - Pollux

Yep, you can use radio buttons on your Containers to activate certain containers to run and disabling the other parts! the accepted solution here shows what to do: Solved: Radio button enable/disable container - Alteryx Community

Gandalf_NotGrey
8 - Asteroid

Thanks so much @alexnajm for the response.

I am sharing a sample workflow for your reference.

This has one main App 'RunSeparatePartsSample.yxwz'. Here the user is giving two inputs, based on which, data prep is done and finally the information is fed row by row into a batch macro 'Main App Macro.yxmc'.

Inside this macro, based on the Category Details column, there are 5 separate flows which could be taken.

Now, it doesn't matter what the Category Details column contains, other 4 flows run as well and in the actual workflow these are huge hence, they take a lot of time.

My aim is to run just one out of these five flows, based on the Category details column. Is this possible to do?

From your earlier response, unfortunately I could not gather how to do this. 

I have attached the sample for your reference. Kindly have a look please. Thanks.

alexnajm
18 - Pollux
18 - Pollux

Ok that's a big difference - what version of Alteryx are you on? Are Control Containers an option? Use Case #3 could work well: Control Containers: Take Control of Your Workflow - Alteryx Community

Gandalf_NotGrey
8 - Asteroid

I am on 2022.3, control containers are not here yet..... :(

alexnajm
18 - Pollux
18 - Pollux

Ok no worries, then try connecting your Control Parameter in your macro to each of the containers and set the action tool to use a Formula to enable/disable the container (similar to the solution above). It'd be something like: IF contains([#1],'C1') THEN "False" else "True" ENDIF for the first container, and just update the formula to C2, C3, etc. for the subsequent containers

How to run just one part of the workflow at a time.png

Gandalf_NotGrey
8 - Asteroid

Thanks so much @alexnajm 

I tried this, but got the below error when using the AMP engine - Error1.jpg

And without the AMP Engine I get this error - Error2.jpg (Output48 is the Macro Output tool in the MainAppMacro)

 
 
 
 

I have attached two screenshots of the workflow as well.

alexnajm
18 - Pollux
18 - Pollux

After further inspecting your workflow, I noticed that the control parameter is mapped to your record ID rather than the category - the actions won't work the way I thought since I assumed you were bringing in the category for the filter.

 

so let me ask this - why do you need a batch macro? based on your logic, it seems like you could just have a formula with 5 if statements to calculate these columns

Gandalf_NotGrey
8 - Asteroid

Yes, I am using a Batch Macro coz I need the categories on go one by one inside the macro and get processed. 
On each run of the Macro, an output is produced and saved and one line item is sent outside through the Macro output tool.

Once all individual entries are processed, the main workflow generates an output file with one entry from each run of the macro.

 

If I don't use the batch macro, can this be achieved ?

alexnajm
18 - Pollux
18 - Pollux

I don't think you need to go through the categories one my one - one Formula tool could calculate the 5 columns for process confirmations with IF statements and the FullPath, PLUS another path to generate a "master" fie of sorts

Labels
Top Solution Authors