Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Chained Alteryx Analytic Applications

CameronS
Alteryx Alumni (Retired)
Created

Alteryx Analytic Applications (Apps) are very useful.  They let us take a process, parameterize parts of it, and add an interface so that end users don't need to know all of the inner workings of the process in order to make it work for their specific scenario.  We can even take an app and publish it to an Alteryx Gallery so the process can be shared with someone who doesn't even have Alteryx installed on their machine. 

 

A common question we hear from app builders is, "how do I make the choices presented for one interface question depend on a previously answered interface question?".  This is primarily accomplished by chaining multiple apps together such that the results from App #1 dynamically provide the options for a drop down or listbox question in App #2. Step 1 and Step 2 in the attached package provide an example.

 

What if the question you want to update is not a drop down or listbox?  You can actually use App #1 to dynamically update the raw XML controlling the question (or any tool) in App #2 prior to presenting the questions of App #2 to the user.  Step 2 and Step 3 in the attached package provide an example.

 

 

Less often, we are asked how we can create what I like to call a "feedback loop" in the interface.  This involves the user of the app filling out a set of questions, seeing some result from those questions, and deciding whether to continue forward or go back to modify their initial selections. This can be accomplished using the same idea of modifying the XML to dynamically decide which app becomes the next link of the chain in a process.  Step 3 in the attached package is an example that will either move on to a real step 4 if the user is happy with the results from Steps 1-3 or will loop back to Step 2 so the user can modify their initial selections.  They can continue in the loop, modifying their selections in Step 2 over and over until they are satisfied with the results and choose to move on to step 4.

 

 

The attached package contains an example for each of these options with a few notes calling out the different examples.

 

Please note that both options involving modification of an app's XML will not work in an Alteryx Gallery because any app run by the gallery must be verified by the server ahead of time and there is no way to build this verification step into the app.  

 

 

Attachments
Comments
DanO
5 - Atom

Great article.  Regarding the note on modifying the XML not working on an Alteryx Gallery, can that be worked around when deploying on a private Alteryx server?  

mmenth
11 - Bolide

Thanks for this, I have a question though about using this on a gallery. I see that in your 'On Success - Run Another Analytic App'  you have simply 'Step 2.yxwz'. If this were to be run on a gallery, how would you put the link there? I tried saving both apps to my company's gallery and putting the name of the second step here with the file extension and it did not run the second app. How is this accomplished?

CameronS
Alteryx Alumni (Retired)

@DanO - No, a private Gallery does not allow a workaround to this at present (v11.5)

 

@mmenth - You will need to chain the apps together prior to publishing either to the gallery.  They are treated as a single, combined app by the gallery.  

andrew_cook
6 - Meteoroid

This is a great article and really helpful. If I wanted to populate the selections in the drop-down tool with values retrieved from another Alteryx workflow, how would I do it? I can't figure out how to run the preliminary workflow, which gathers the values I need BEFORE the user is prompted to select from the list of values. Below is a graphical representation of what I think I want to do.

Thanks!

Andy

 

API WF.jpg

 

 

Dynamomo
11 - Bolide

@andrew_cook

I believe that this needs to be a two step process.  this is because the app interface comes up before the workflow runs, so it can't dynamically download that info and show until the workflow runs.

1- you build an app that does everything up to your last select tool and then output this to a file.  This file needs to have two fields (Name and Value).  this app does not require an interface if there is nothing to interact with but sometimes I'll put a brief description of the app in the interface.  In the Interface Designer view for this first app, you need to point to the second app in the "on Success - Run Another Analytic App".

2 - The second app will read the list file created from the first app in the Drop Down tool and use what is selected to populate the Text Input tool.

 

andrew_cook
6 - Meteoroid

Thanks @Dynamomo, this will work.  However, I was hoping to avoid storing the results of the first app. I also would like the end user to only interact with the 2nd app. I'm probably asking for too much. Your thoughts?

Dynamomo
11 - Bolide

 

@andrew_cook

I'm pretty sure what you are trying to do is not possible in one workflow.  check out this post from Fadi and then scroll down near the end where he explains why it cannot generate a dynamic list.

https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Dynamically-Create-List-Box-Values-From-Inpu...

The data from the input file is actually stored as metadata in the workflow.  I opened mine up and found it in there.

Two options i can think of:

1 - linked/chained apps (your user won't even know that two are running)

2 - since whatever you are doing to generate the list is not something that you need the user to dynamically interact with.... maybe you could put that part of the process on a  recurring schedule to generate a recent list file and use that file in your app

 

Hakimipous
10 - Fireball

Great tutorial, especially Step 2 is useful (How to dynamically update a List Box is what I was looking for)

 

I would add that for step 1, there is a way not use SQL commands to generate values in the drop-down list.

 

You can simply create a unique list of values with a Summarize tool, transpose, attach a record ID to it, then cross tab your data.

 

(check this awesome tip on how to keep your original names without the "_ " )

 

One it's done you attach the stream to your drop-down tool,  then select the option "Field from Connected Tool", and voila !

 

This step is longer (but not so difficult) and can help people no familiar at all with SQL commands 

 

I can attach an example if needed.

 

 

Cheers!

 

 

justin_winter
8 - Asteroid

I'm a little intrigued about the comments in here about not being able to do dynamically created, chained apps in a private gallery. We are currently on 11.5.1 for our server and I was playing with a dynamic query tool that used table drive values to let a user, in a series of chained apps: (1) Select what dataset they wanted to query (2) Select which columns they wanted to retrieve and then (3) Enter filter criteria for eligible columns that then runs a "Business Objects"-like data aggregation and output. App 1 (dataset) drives App 2 (Columns to retrieve) via a dataset, but App 1 & 2 together dynamically create the input criteria filters (could be 1 or could be 20) by dynamically building the XML for the third app. Reading this thread, it would seem that folks think that isn't possible, but it seems to work just fine for me.

 

Dynamically built, chained apps are incredibly powerful! (Though possibly fragile due to changing XML structure in future upgrades...?)

 

Am I missing something here?

Thoughts? PM me if you are interested in talking about what I built if you want to try something similar.

Thanks,

Justin

anand
7 - Meteor

This question specifically relates to Chained Apps on Gallery. It works without any issues for most cases. But looks like there are caveats.

 

Master App.jpg

 

 

I have a requirement where a user would choose a value from a drop down and based on the choice a specific app needs to run. So as seen above, at runtime 'Chosen App' gets written based on what user had selected. 'Chosen App' is chained to the original app.

This all worked fine until now. Based on a new requirement App A1 had to be chained to 'App A2'. 

The problem with this now is that all other apps viz. App B and App C also get chained automatically to App A2 after publishing to Gallery.

 

I am unable to attach the example app; but let me know if the above is not clear.

Requesting if anyone has any suggestions.

Ozzy_Campos
8 - Asteroid

Thank you so much, this was really helpful to see an example in action.  

justin_winter
8 - Asteroid

@anand Let's say we have an App A that can then call A1, A2, or A3 based on a user choices. The way I would handle that is to store the XML for app A1, A2, A3 all in text file inputs into the first app, then chain App A to an App B, where B is the written output .yxwz (XML data) of either A1, A2, or A3. That is, if the user chooses A1, then you actually write out the single row, single column of data (the whole A1 XML file) out as CSV without headers and without column delimiters and have it write it as a .yxwz. That way you are only chaining to one app but that chained app file dynamically changes based on the user's choice. I've done that in the past and it works fairly well. I can provide an example if helpful.

Thanks!

Justin

anand
7 - Meteor

@justin_winter

 

Thanks for your response and suggestion.

In principle I am taking a similar approach. I badly want to share the app with you, but this editor doesnt allow me to upload files.

Is there a way in community to share files other than starting a new topic?

 

 

nikhilgurg
5 - Atom

Has there been any solution to your approach @anand ? I am kind of stuck in similar stuff.

anand
7 - Meteor

Hi @nikhilgurg ,

 

Unfortunately not.. We are working on an alternative UI completey different from Alteryx Interface tools.

Just realized we were expecting too much from rudimentary features and thinking of hacks all the time.

Al12397ey
5 - Atom

In regards to this feedback loop is there any way to see how many times the user has chosen to go back into the loop?

 

The application I am trying to build is that a user can choose a certain option from the interface X number of times and I need to store their selection (and records associated with that selection) and the order in which they were selected.

 

The idea I had in mind was that whenever a user chooses an option an indicator for "the number of times he went in the loop" would be part of the output 

 

For example:

 

In the first loop selection he chooses "DOG" and this outputted as "Output_1"

       the 1 would be the first loop

In the second loop he chooses "CAT" and this is outputted as "Output_2"

       the 2 would be the 2nd time around the loop

I need to build an application that does this loop X number of times and stores the output based on the order in which selection was made.

 

Please let me know if this is possible and any help would be appreciated 

DanM
Alteryx Community Team
Alteryx Community Team

@Al12397ey

 

Based on your explanation, if you are creating a chained app for this and each "loop" is an app, you can right out each output from the individual app with any designation either in the file name or a column within the data to tell you what they selected and which number app it came from. It could be as simple as using a text input tool with a column that has a #1 in it and then have an action tool from their selection update a field with their selection. You can then either append that to the data or have it be apart of the file name depending on how you want to output the data.

 

Hopefully this helps.

 

DanM

Karlygash
7 - Meteor

Good Day, 

 

Thanks for the article. I tried to do the same way, now I m trying to run lets app_1 which has connected to app_2 in the alteryx gallery. I uploaded app_1, but when I run in the gallery itself, the app_2 did not run. Is it possible to solve this issue?

 

Thanks in advance 

fsalmon
7 - Meteor

Thanks for the article.

 

Step 3 is exactly what I needed to make an App with a menu to run other apps off and circle back to the menu.

Felipe_Ribeir0
16 - Nebula

Hi @CameronS. Its possible to show render results or configure a file to be downloaded from the gallery between 2 apps?

anuninan07
7 - Meteor

Hi All,

 

I recently tried to created chained app interface suggested by anand, but I am unable to run the Chosen App. I am getting the below download option in Server version instead of running the app selected. Is there any idea for solving this issue 

 

Output

anuninan07_0-1656057311684.png

 

Workflow 

anuninan07_1-1656057437494.png

 

 

 

 

lepome
Alteryx Alumni (Retired)

@anuninan07 
That is what I would have expected to happen. 

This would be challenging on Server with standard Interface tools.  I think you'd have to use Action tool(s) to modify .xml in creative ways.  Perhaps you might investigate some of the new Connectors tools available in the Gallery.

anuninan07
7 - Meteor

@lepome 

Thank you for responding

Are you aware about how to modify the action tool based on xml to work in Server. I am new to Server version and any help is much appreciated

lepome
Alteryx Alumni (Retired)

@anuninan07 
No, I don't know of a way to do it. I used the word "creative" to mean "if it's possible, it would require creativity beyond my experience."

kamanivk
8 - Asteroid

@justin_winter 

Would you be able to share an example of the app you mentioned in the below post?

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Chained-Alteryx-Analytic-Applicatio...

 

Thank you

 

anuninan07
7 - Meteor

Hi @justin_winter  @kamanivk 

 

Do you know where the alteryx app in server version is stored physically? when we are writing the chosen app as a separate app, from where will it be selected? may be the file path is not determined correctly while doing this way.. 

CatheyH
8 - Asteroid

Would it be possible to present the user with some information - for example in an interactive map such as can be found in the browse tool before them making the selection?

I want to present the user with two points on a map and get them to select an option based on what they can see (Point A is correct, Point B is correct, Neither is correct etc)

Thanks!

 

Dynamomo
11 - Bolide

@CatheyH - there is a Map Input tool that could be used as the First interface for your app.  Have you used it before?

Maureen

ChristianCartagena_
6 - Meteoroid

Hi, I have a zip file that contains multiple csv. files inside (Directory Input). I am trying to create a list box that allows the user to upload the zip file and select which file(s) inside they want to run. Any Help? thank you

Ezgicinar
5 - Atom

Hello,
I am currently trying to chain 2 apps together. App 1 is my main app, the situation here is that I want to start app 2 at a certain point. The important thing here is that app 1 should not run completely. App 1 is supposed to generate output that I then want to call and process in App 2, in parallel App 1 is supposed to continue running through. The output of App 2 should then be displayed in App 1 and processed there. Can I do this with chained apps?

Dynamomo
11 - Bolide

@Ezgicinar - No, the way chained apps work, the second app is called once the first app has completed.  Perhaps if you add more detail around what you are trying to do, myself or another community member may be able to suggest another alternative.

Maureen

Ezgicinar
5 - Atom

@Dynamomo
In the first workflow, I create the data set that I need for the second workflow. However, the first workflow creates much more data. The created output for the second workflow should be quite at the beginning. This data should be passed to the second workflow and in this workflow two outputs should be generated at the end, which will be called again in the first workflow. I want to further process or specify the output generated by the second workflow in the first workflow. The first workflow should be executed after receiving the output from second workflow.

If it is possible, the output should not be stored on the computer.
Perhaps it would also be important to mention that the second workflow will be a standard workflow and the first workflow will change depending on the company.
Thanks for your help