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.
SOLVED

Running a workflow on a drive that changes path letter designations between systems

MikeD
8 - Asteroid

I am running a workflow on several different machines, and multiple external hard drives.  The data files are typically something like E:\Data\..., but could be C:\Data\... or other names, depending on which computer is used.  I cannot change any of the drive designations, even temporarily.   My workflow has about 30 distinct inputs.  Is there a way to set a variable at the start of the workflow that is then used to set the path to the data in the rest of the workflow ?  Right now I have to manually change the links to all 30 files when switching between machines.

Thanks

6 REPLIES 6
agentzerow
7 - Meteor

You can use something like:

 

..\..\Data\*.csv

 

This should pick up your path automagically and look for the Data folder and any csv within the folder

MikeD
8 - Asteroid

Thanks! I have that logic in the workflow now, the issue is that the drive name (C,D,E,F) keeps changing between machines.

agentzerow
7 - Meteor

That syntax works for me running files from my local machine, if copied to a server it runs the same way. Not sure if i'm not understanding the problem correctly

agentzerow
7 - Meteor

Literally this

 

Capture.PNG

jasperlch
12 - Quasar

Hi @MikeD,

 

Yes you can create a user constant:

 

First, click on any white space on the canvas, in the configuration window, go to 'Workflow' tab and click on the "+" sign. Then input the name of your user constant, e.g. 'Drive' and input a value, e.g. "C" for now:


Capture1.PNG

 

Then, in all your Input tools, put %User.Drive%:\Users\blablabla\test2.xlsx as your path:

 

Capture2.PNG

 

When you run the workflow, the user constant, %User.Drive% will then be replaced by "C".

 

Next time, when the Drive changes, all you need to do it updated the value of the user constant in the configuration window

 

Hope this helps

 

Jasper

 

 

 

MikeD
8 - Asteroid

Thanks to everyone for the help!

 

Labels