Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dynamic paths using user/system variables for Alteryx dependency

B3TON
5 - Atom

Hello,


I am currently testing whether my company could use OneDrive as repository for all of our new projects.


Example path:

C:\Users\MyUserNameFolder\CommonCompanyOnedriveFolder\SpecificTeamsDirectoryFolder\


"C:\Users\UserName" is dynamically changed part of all dependecies located on our Onedrive TEAMS folder. In order to dynamicaly define that part for all of our input/outputs we have to utilize GetEnvironmentVariable("USERPROFILE") function at all input/output routes.


Problem lies with macros. Although I can use %TEMP% user variable to define paths for all macros, I wasn't able to replicate that with %USERPROFILE%

 

<EngineSettings Macro="%TEMP%\CommonCompanyOnedriveFolder\SpecificTeamsDirectoryFolder\OneDriveTesting\testingmacro.yxmc" /> works

 

<EngineSettings Macro="%USERPATH%\CommonCompanyOnedriveFolder\SpecificTeamsDirectoryFolder\OneDriveTesting\testingmacro.yxmc" /> doesn’t

 

Could you please advise how could we enable %USERPROFIE% environment variable accross Alteryx dependencies?

 

 

 

2 REPLIES 2
csmith11
11 - Bolide

Unfortunately, after extensive research I wasn't able to find a way to dynamically provide the user profile in the XML.

 

Alternatively, instead of using absolute paths, you can leverage relative paths instead.

csmith11_2-1638888552165.png

 

 

 

csmith11_0-1638888521678.png

 

The relative paths are then used in the XML and are relative to where the workflow (using the macro) is located. If the workflow is moved move the relative link may no longer work.

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Use-Relative-Paths/ta-p/1160

 

Please let me know if this helps.

csmith11_3-1638888716924.png

 

 

 

 

 

 

B3TON
5 - Atom

Hello csmith11, I am aware of that option. We could go down that road but:

  • that would mean our system architect would have to clone paths of all default custom company macros for each of my coworkers, in order to retain dependency links to all macros shared company wide while running workflow on gallery.
  • Custom macros (meaning part of the solution) would have to be always uploaded to gallery, which can sometime cause a migraine during enhancement rollout or bug fix during UAT stage.

My suggestion would be to update Alteryx engine and enable it to read any system/user variables at runtime for dependencies as well. That could speed things up across the globe as Alteryx tends perform slowly while working with shared drives due to ever present delay. It should be a standard to work with local replicas instead of remote ones. Alteryx support couldn't help either as I had already contacted them as well. Will create an elaborate idea soon. Hopefully Alteryx devs aren't that busy.

 

Labels