ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

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

MikeD
Asteroide

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 RESPUESTAS 6
agentzerow
Meteoro

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
Asteroide

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
Meteoro

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
Meteoro

Literally this

 

Capture.PNG

jasperlch
Cuásar

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
Asteroide

Thanks to everyone for the help!

 

Etiquetas
Autores con mayor cantidad de soluciones