Alteryx Designer Desktop Discussions

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

In an Analytic App do the Questions run before any Workflow?

willhaye
8 - Asteroid

I have an Analytic App in which I'm trying to read a directory to populate a drop down (picture attached). The idea is for the user to pick from a drop down among the last 10 files which have been touched in a specific directory. The problem seems to be that the list doesn't get refreshed unless I run it as a workflow.  If I just run it as an analytic app the list seems static no matter what new files are added to the directory.  This leads me to believe that the questions are asked of the user *before* any part of the workflow is run even if the user interface component is downstream of some of the tools.  Is this correct?

 

If so, how else might I approach this situation?  The goal is to read the list of files available and feed that into the users choice at least somewhat dynamically.

 

Your collective thoughts would be appreciated.

 

Thanks,

 

-Hayes

9 REPLIES 9
willhaye
8 - Asteroid

Annotation 2019-11-20 093620.png

(sorry, this is the picture.  I didn't mean to make it an attachment.)

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @willhaye,

 

In order to achieve this you'll need to break the workflow up and create a chained app. Essentially you need to write out the output of the list in the first workflow and read it into the drop down list and use the value for the second workflow. Take a look at a blog post on chained apps by one of my colleagues Brian Scally which should help you create the chained app. https://www.thedataschool.co.uk/brian-scally/chaining-apps-in-alteryx/

 

Also take a look at weekly challenge 175 https://community.alteryx.com/t5/Weekly-Challenge/Challenge-175-Tire-Size-Calculator/td-p/447639 and download some of the solutions to look into writing out data for a dynamic drop down box.

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

willhaye
8 - Asteroid

Thanks Jonathan.  Appreciate the quick reply.  So it is true, then?  The questions are asked of the user before any part of the workflow is run?  Just confirming.

Jonathan-Sherman
15 - Aurora
15 - Aurora

The interface tools in essence create "parameters" to allow user inputs. The list box in your example has been filled with data from an earlier stream in the workflow and since the workflow is not run until the interface questions section has been completed the list box wouldn't be able to take new data. So in answer to your question the questions are asked before the workflow is run yes.

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

patrick_digan
17 - Castor
17 - Castor

@willhaye I have an idea here suggesting that they should make it dynamic like you would want.

 

I also have this idea that is similar about allowing a new option called data from connected tool. Since it would be a new feature, the ideal implementation would allow the data to be refreshed at runtime. Perhaps it would work for you as well if Alteryx builds it.

 

cc: @AdamR_AYX 

Chawnan
6 - Meteoroid

I am facing similar issue where the user is getting old dropdown options. Could  you please suggest a way of removing the data from earlier stream of workflow?

patrick_digan
17 - Castor
17 - Castor

@Chawnan There is no real way to get rid of the old data. You'll need to reconfigure your setup. The key is that you can switch your dropdown to read data from an external file. This will refresh the data at runtime. You can either

 

1) Use chained apps. In this case your first app will populate the drop down. This is done by writing to a file, and having your second app read in that same file in your drop down. There is an interactive lesson here.

 

2) Change your workflow so that it writes out the file that the dropdown reads in. This will not be the best user experience, but it may work for you. The idea is that your workflow will be 1 run behind. So if you wanted to populate your dropdown with fresh data, run the workflow once with dummy selections and then come back and re run it. If you've reconfigured your dropdown to read the external file that was just written, this second run will now show you updated data from your first run. 

Chawnan
6 - Meteoroid

Thanks for replying.

 

I tried chained app approach where my first analytic app "Chained App" is saving the choices in a file and my second analytic app "Chained App2" is asking the user to select choices.

 

When i make any change to the input file "Choices.xlsx", say update label Choices 4 to Choices 5 and then run Chained App, it doesn't provide the option of Choice 5 in drop down and instead shows Choice 4 which i suppose is saved in its earlier stream.

 

Could you please suggest what is that i am doing wrong?

 

Attached along is package for your reference.

patrick_digan
17 - Castor
17 - Castor

@Chawnan Thanks for setting up the sample! The key is that you have to change your dropdown to reference an external file. And the external file needs have name value pairs. So I've modified your first and second workflow so that it would look like this:

1) Add a record to your excel file. 

2) Run the first app, which updates an intermediary excel file.

3) The second app runs after the first which should now have the added record.

 

Note that I also changed your filter to reference the value field since the dropdown shows the name field but passes the value field to the action tool.

 

Hope that helps!

Labels