Alteryx Designer Desktop Discussions

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

How to pass parameters between workflows

lbjohn
7 - Meteor

Hello,

 

I want to pass a value from a parent workflow to a child workflow.   In the parent workflow, I have created a single value.  That value will be passed to the child workflow, to create a report with the selected results.

 

Thanks,

 

John Wong

 

 

 

 

9 REPLIES 9
atcodedog05
22 - Nova
22 - Nova

Hi @lbjohn 

 

Can you provide more info what value should be passed to where ?

lbjohn
7 - Meteor

I have attached 2 sample workflows:  parent workflow and child workflow.   In the parent workflow, the value "IT" is selected.   I want that value to pass to the child workflow, so that the list of values from the childworkflow table is displayed

JagdeeshN
12 - Quasar
12 - Quasar

Hi @lbjohn ,

 

You can possibly do this using the concept of Chained Apps.

 

Please find attached a sample workflow to showcase that. The parent workflow runs the child workflow on success and also passes the filter value using a temp file.

 

Hope this helps.

 

Best,

Jagdeesh

atcodedog05
22 - Nova
22 - Nova

Hi @lbjohn 

 

If you want to only send values you can do something like this.

 

Parent Workflow: write output to a file

atcodedog05_0-1629478791023.png

 

Child workflow: read the file and do an inner join this way only the value outputted from a parent will be selected in inner join.

atcodedog05_1-1629478849178.png

 

If this is not what you are expecting please provide us more info.

 

Hope this helps : )

lbjohn
7 - Meteor

Thanks,  However, the use of an interim file will not work.   As I will have multiple users using the parent workflow at the same time.   

lbjohn
7 - Meteor

To think out loud, is there a way to run a workflow with a pass through parameter, that works for multiple users using the workflow at the same time?   I know I can run a workflow as an app, with human input values.   The question here is how to do it without a human input.   

 

Here I have updated the Parent workflow and make it an app.  User would select a department from Parent, I want that value to pass to Child, and create the report at the end based on the pass through value

JagdeeshN
12 - Quasar
12 - Quasar

Hi @lbjohn ,

 

I am assuming that all the users would be using this on the Server/Gallery?

 

If that is true, then the solution in my earlier post should work. I say that because a different working directory is created for each run. This in-turn creates a different temp file for each run. This is made possible by having the temp file as part of the same directory structure as the workflow.

 

The folder structure would look like this:-

JagdeeshN_0-1629483869629.png

 

The inputs.outputs  folder contains the temp output file:-

JagdeeshN_1-1629483932218.png

 

 

The workflows folder contains the apps:-

 

JagdeeshN_2-1629483990641.png

 

 

 

Hope this helps.

 

Best,

Jagdeesh

 

lbjohn
7 - Meteor

Thanks.  How do you set the name and path for the input temp file in the Child Workflow, so it knows which temp directory and which file to pick?

JagdeeshN
12 - Quasar
12 - Quasar

Hi @lbjohn ,

 

You can using the concept of relative paths to achieve this. In the sample i have attached, it is setup that way.

 

Please find below the screenshots on how to do it.

 

Parent Workflow settings:-

JagdeeshN_0-1629485001116.png

 

JagdeeshN_1-1629485017852.png

 

 

Child Workflow

 

 

JagdeeshN_2-1629485073286.png

 

 

JagdeeshN_3-1629485106999.png

 

 

Hope this helps.

 

Best,

Jagdeesh

 

Labels