Hello everyone.
For my workflows, I use the Directory tool for reading multiple files at once, then filtering only the one of my interest.
Currently the Directory path is:
C:\Alteryx\User1\Input*.csv (this is static)
For my output files I use a dynamic path through a SHARE set up on my PC.
With a formula tool a create the path with this formula:
GetEnvironmentVariable('ALTERYX_SHARE')+'\OUTPUT\output.csv')
The SHARE is called ALTERYX_SHARE and in my case it corresponds to USER1, in the case of an additional user the ALTERYX_SHARE will correspond to USER2, USER3, etc...
How can I make my input PATH as well as my output PATH dynamic? Can I find a solution without an interface tool?
Thanks to anyone who will help me.
Is the result of GetEnvironmentVariable('ALTERYX_SHARE') not dynamic (different result for each user?)
Can you provide examples of a function call and output for different users?
When you say "additional user", do you mean someone else running the workflow on a different machine, where their environment value for ALTERYX_SHARE may be different? Are you running the workflow on an Alteryx server, or only desktop?
Chris
@sebenciven
Well, the best that I know is that you can get the users to use one time the User Interface to get their UserID and create a database that Alteryx will use going forward. After that one time Alteryx will recognize the user and will know which path to use.
However it is require the users to go one time to the gallery and run that initial WF that will add the user to the database.
Hi,
the result of GetEnvironmentVariable('ALTERYX_SHARE') is dinamically for each user.
In my case ALTERYX_SHARE = C:\User1\Desktop
For my collague ALTERYX_SHARE = C:\User2\Desktop
In this moment this function is used only per output data but I would use it also for input data.
When you say "additional user", do you mean someone else running the workflow on a different machine, where their environment value for ALTERYX_SHARE may be different? Yes, the variable ALTERYX_SHARE is different per different machine.
Are you running the workflow on an Alteryx server, or only desktop? Both
Hi @OTrieger
My workflow will be scheduled, so I can't use an interface application to set up every time there will be a different user.
@sebenciven
I see. The fact that your the automation will be scheduled still is not contradicting my solution. I'm using a very similar scenario.
There is a totally different automation, requires the users to first time run it so Alteryx will be able to get their user ID, after doing that your scheduled automation will use that databased to define the path based on user.
It is a very simple automation that is asking the users to enter their names. While you have a list of names and paths What Alteryx will do will match the user ID to the names and then can use the paths. Each user have a unique Alteryx user ID on the gallery, so somehow you will need to collect these user ID.