Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Passing Parameter on Interface using batch script.

Jafar
7 - Meteor

Hello Team.

I have created a workflow with user interface with StartDate and Endate.
I want to pass parameter using batch script.
My workflow should accept input from batch script and get executed.
No need for the user to select date manually.
Attaching workflow for the reference.

 

11 REPLIES 11
FinnCharlton
13 - Pulsar

You can run workflows from Command Line with AlteryxEngineCmd.exe

You can include the app parameters using an XML file. The command would look something like this:

AlteryxEngineCmd.exe MyAnalyticApp.yxwz AppValues.xml

 You can batch as many of those commands as you want.


More info here: https://help.alteryx.com/20223/designer/run-workflows-command-line

Jafar
7 - Meteor

@FinnCharlton 
Thanks for your quick response.
Can you help me with a sample workflow?

 

FinnCharlton
13 - Pulsar

@Jafar are you trying to run this workflow using command line?

If so you don't need the Run Command tool inside the workflow, unless this is fulfilling another purpose.

 

My interpretation is that you want to run this workflow for any combination of dates, without the user having to input them manually. Is this correct?

If so, you could make this a batch macro instead of an app. You can then input a large list of start and end dates and the macro will input them all into this workflow for you.

FinnCharlton
13 - Pulsar

@Jafar , something like this:

As an example I've generated every combination of start and end dates in your date range.

This workflow batches them all through the workflow you made, with no need for manual input.

FinnCharlton_0-1675857081487.png

 

Jafar
7 - Meteor

@FinnCharlton 
I want to pass parameters with the bat file.

 

FinnCharlton
13 - Pulsar

@Jafar Which parameters do you want to pass using a batch file? The Start and End Dates? Why is this preferable over a batch macro?

Jafar
7 - Meteor

Our requirements is to refresh the Alteryx Workflow using Power BI refresh button.
This can be achieved with Power Automate.
In power automate we can add bat script and within bat script we can specify the Alteryx workflow path.
However, I am able to run the workflow but how to pass parameter in bat script is the challenge.
That's the reason why I need to pass parameter in bat script.

 

FinnCharlton
13 - Pulsar

@Jafar Ah I see, you need to somehow generate an XML file with your parameters included, then call that as an argument in your .bat file. To avoid manual steps you'll need to generate this file with Power Automate, which I have no experience with so won't be much help. 

 

This might be a stupid question, but all you are doing in this workflow is filtering the data? Can you not just dynamically filter within PowerBI?

Jafar
7 - Meteor

@FinnCharlton 
I can load the whole data and then filter it. But then this will create a performance issue.
Instead, we can just use parameters and filter the data and then refresh the dashboard with only the required dataset.
This is what I am trying to achieve.

 

Labels