Alteryx Designer Desktop Discussions

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

How to perform Conditional Loop and run the workflow for certain conditions?

madhurinani
8 - Asteroid

Hello,

Below is my input file.

 

GroupCostBalance Left
A16
A28
A33
A44
B56
B61
B73
B89
C93
C106
C112
D123
D131

 

 

Now, I want to run the workflow for Group A and store the output in an excel file GroupA.xlsx

Then the workflow should again run for Group B and store the output in an excel file GroupB.xlsx

and so forth.

 

Is it possible? I tried to use the Condition interface tool as well as the Macro Input tool but somehow ran into a dead end.

 

Also, is it possible to run the workflow for All Group values (A-->D) at once and also provide a drop down option for the user to run either A/B/C/D?

 

Your help would be highly appreciated.

 

Thanks

7 REPLIES 7
JamesCharnley
13 - Pulsar

To run all groups at once and allow the user to choose which group they 'want to see' as such, that's a good use case for an analytic app. You'd set it up as follows:

 

JamesCharnley_0-1664544107532.png

 

A summarise tool grouping on group twice, and the cross-tab tool will give you one column for each possible group, to feed into a drop down tool for your app.

 

In the action tool, you're choosing which group you want to replace in the condition of your filter. This will allow only the records for the group you want through.

 

As for your other question about different outputs, the best way to do that would be with a filter tool, filtering to groups and attaching outputs to each one.

madhurinani
8 - Asteroid

@JamesCharnley :

Hi,

I tried to run the Analytics App and somehow its not working for me.

I added a new formula and stored the output in an excel file, while everything remains the same.

When I run, and select any group, it defaults to A only.

 

Am i missing something?

madhurinani_0-1664545429406.png

 

JamesCharnley
13 - Pulsar

 @madhurinani Sorry, I didn't set up the interface designer. You'll want to open up the interface designer under View > Interface Designer and tick whatever you want to be able to see as the output. In your case, you'll want to tick the output tool. In my case it's the browse.

 

JamesCharnley_1-1664546592129.png

 

When you run this as an analytic app with the magic wand button next to run, it should be working.

madhurinani
8 - Asteroid

@JamesCharnley : Your solution of using a Filter tool to filter the groups and store in different outputs files will only work if i have 1-2 groups. I might have 10+ groups and having so many filter tools might not be an ideal solution.

Christina_H
14 - Magnetar

You don't need a filter to create multiple output files, just use the option in the output tool to take the file name from a field.  If you use a formula to create the different file names, a single output tool will write the data to the correct files.

Christina_H_0-1664553718013.png

 

madhurinani
8 - Asteroid

@JamesCharnley : You have used the Drop Down tool which only allows for a single group to be selected. 

 

I tried to change to a check box which would enable to choose either 1 or multiple. But somehow I am unable to get that fixed.

Would you be able to guide me ?

 

Thanks

JamesCharnley
13 - Pulsar

@madhurinani  Sorry for the delay in response. If you haven't managed to fix this by now here's how it's done:

 

Instead of having the [Group] in your filter '=' something, you'll want to use IN to allow for multiple conditions to be changed in one action.

 

JamesCharnley_0-1665478691086.png

 

Then instead of the drop down you'll want a list box. You'll want to change the settings on this to 'Generate Custom List', and leave the start, end and separator as the default. This will keep your IN condition in the correct format when it changes during the action.

 

JamesCharnley_1-1665478926819.png

 

Finally, you'll want your action to replace the contents of your brackets within the IN of your filter.

 

JamesCharnley_2-1665478988766.png

 

Labels