In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

How to parameterized the source connection in Alteryx

amsrivas
6 - Meteoroid

Hi Guys,

 

I have created workflow that loading data from source to destination in local machine.

 

Path provided in both source and destination are hardcoded, I would like to parameterised the source and destination folder path so that if in future, if I need to change the path of the source and destination, I can only provide values to the source/Destination parameter and changes will get reflected into all the places.

 

Please suggest

 

Thanks

Amit 

 

 

7 REPLIES 7
milos_bijelic
Alteryx Alumni (Retired)

Hi @amsrivas , 

 

To parameterize workflows I would recommend creating Analytic Apps. Here is an introduction to creating analytical apps

 

I've mocked up a workflow that updates the source and destination paths via a File Browse GUI as well 

 

Hope this helps!

Milos 

DataNath
17 - Castor
17 - Castor

Is something like this what you're after @amsrivas? I've just built out a very quick example with a simple formula step in between to demonstrate - the key focus here is the File Browse tools affecting the Input/Output Data tools. As you can see from the pictures below, when I run the app, the user is prompted to navigate to a file to use as the input:

 

DataNath_0-1665603569635.pngDataNath_1-1665603580399.png

 

Before then entering a destination and file name/type:

 

DataNath_2-1665603620215.png

DataNath_3-1665603627656.png

 

The file will then save and you can also open it right away:

 

DataNath_4-1665603653120.png

DataNath_5-1665603676970.png

 

I've attached the app and dummy files in case you want to play around yourself and see.

amsrivas
6 - Meteoroid

Hi Milos, Thanks for the response.

 

I have tried to access provided URL (introduction to creating analytical apps) but it is not working for me.

 

Also, I tried to execute (update-source-destination-with-file-paths.yxwz) however it didn't ask me to change the path of the source and destination.

 

I want something like as below 

 

-> Let's source for Input directory is folder C:/A and if I want to change it to say folder D:/Z, then I want to have one Parameter say PARAM and will use it in place of path C:/A and make it referred wherever i path C:/A is used in the workflow.

 

Later, if i want to change C:/A to D:/Z then I will simply change the value of PARAM to D:/Z and it will change in all the places in workflow.

 

Thanks

Amit

amsrivas
6 - Meteoroid

Hi Datanath,

Thanks for reply.

 

I don't want to provide luxury to the user to change the path, instead I want to have one Parameter for source path so that If want to change the path of the source, I can simply change the value of the Parameter and it will change everywhere.

 

Thanks

Amit 

milos_bijelic
Alteryx Alumni (Retired)

Hi Amit, 

 

Unfortunately, I think Datanath built out the solution I was conceptually thinking about as well. There's no good way that I know of to have those kinds of "parameter variables" outside of using the interface tools like in Datanath's workflow 

 

Best,

Milos 

DataNath
17 - Castor
17 - Castor

@amsrivas my apologies, I thought you wanted a way for the user to change this, hence the Interface tool approach. If you just want a way of changing a single thing that is reflected in all areas that it's referenced, you could just create a new workflow constant by clicking on any whitespace on your canvas and navigating to Workflow > Constants:

 

DataNath_0-1665693710326.png

 

Now, this [PathForFormulas] constant that I have created, holds the value next to it i.e.'G:\My Drive\My Documents\Alteryx\Community help' in my case. So when I reference this in formulas (I've just used it in 3 separate ones here to show how it works), this filepath is connected to that constant:

 

DataNath_1-1665693802564.png

DataNath_2-1665693812984.png

 

Therefore, to demonstrate how this would work for your use case. I now just need to change the value next to this new constant I've created for it to update in all the locations I've used it i.e. the 3 Formula tools:

 

DataNath_3-1665693891411.png

DataNath_4-1665693903932.png

 

Hope this helps! Please let us know if not.

apathetichell
19 - Altair

This really depends upon if you are using your workflow - or if you have an end user. If you have an end user - you want to configure a drop-down with the two alternatives and then connect those to your input tool via an action tool in an app. If you are using the workflow on your own designer- and you just want to toggle - you can manage your workflow dependencies and manually shift back and forth between those two locations.

 

If you are building for end users - you should go through the interface tools/Macro/App training offered by the interactive lessons. These are semi-complicated workflows and there is good deal you'll need to learn before you can build this kind of workflow.

Labels
Top Solution Authors