Alteryx Designer Desktop Discussions

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

Run command with dynamic inputs

alexcellings
7 - Meteor

Hi all, I have a question about using alteryx to run a macro saved within an excel file. Using a guide on here I actually have it running successfully so my question is as follows. I work in an environment where the workflow will be downloaded and run by a new user next year so the inputs for my Run Command tool which currently point to my local computers' file path will no longer be valid once the new user downloads the workflow.

 

1. Is it possible to have the Write Source field be dynamic so the new user does not have to point it to their local folder?

2. Same situation with the Command Arguments field which currently points to the scripts generated locally. Can this field be dynamic to automatically point to their local folders?

 

If not, I am open to other suggestions on how to embed an excel macro within an alteryx workflow without the use of scripts, etc. I just haven't found any other ways.

4 REPLIES 4
BrandonB
Alteryx
Alteryx

If you turn the Run Command tool into a macro you should be able to pass a path into the Output field

alexcellings
7 - Meteor

This seems like an interesting solution but it may be a little above my skill level. Do you have an resources to show how to turn the command tool into a macro? I search briefly on the forum here but couldn't find anything.

 

Exporting the workflow wouldn't help in this situation right? The file paths will stay the same even when a new user downloads the package?

BrandonB
Alteryx
Alteryx

My initial thoughts are that it would look something like this:

 

Parameter.png

 

I would definitely recommend taking a look at the macro lessons in our Interactive Lessons section of the community: https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Macros

 

Macros are a powerful way of dynamically parameterizing parts of your workflow to run differently based on values that are passed in. Happy to help if you have further questions!

danilang
19 - Altair
19 - Altair

Hi @alexcellings 

 

You can actually accomplish this by just turning your workflow into an analytic app.  

 

w.png

 

Just add a Folder Browse tool to update the path in the Command Arguments and File Browse to update Write Source.  The only tricky part is that you have to configure the 2 Action tool to update the correct value in the Run Command tool config.  For example, when configuring the Action tool that changes path in the Command Arguments, make sure that the Arguments is highlighted (Blue) and that you're replacing only path string(Green

c.png

 

When the user runs it, they'll be prompted to enter the new values 

 

ui.png

 

Check out the Creating Analytic Apps interactive training for more info about using the Interface tools

 

Dan

Labels