Dear Community,
We tried to make a use of Environmental Variables (User or System) within workflows, as well as investigated many articles on the topic, which are either radically confirmed Alteryx does not support them (dated from sometime 2019) or giving a specific solution which will not help to work with Environmental Variables fully as we plan.
So, taking all gathered knowledge from Community articles on the topic we tried to trick logic via encapsulating of a Directory function into a Macro:
however, first function was always pointing the following error
, and then added that macro to our parent workflow, but macro was always pointing out to below mentioned error:
So, we trying to understand is our approach is a winning on a long term and we simply missing some bit somewhere (then please suggest what was wrong), or Alteryx in 2021 is indeed is still is not ready to accommodate useful operation with Environmental Variables.
Some additional details:
input function was set as below
environmental variable was set as below
formula was set as below
and output of formula function as retrieving the path which was set on system settings "C:\ALTERYX"
Looking forward for a useful comment.
Many Thanks in advance!
Emil
Solved! Go to Solution.
Try using batch macro. Control parameter lets you write.
Since there is only one variable it will run only one run similar to standard macro.
I am a bit confused as to what you are trying to achieve - can you give an overview of your "end goal"?
Also, you can use environment variables with the getenvironmentvariable() function. See the below example. The variable name just needs to be in quotation marks, not brackets.
Our goal is to define variable paths to make them calling for different target locations depending on which machine the workflow is being ran on:
1) workflow running on machine1 - it targets C:\ALTERYX
2) workflow running on machine2 - it targets E:\Home\ALTERYX
etc.
however, as you can't define Environmental Variable within Directory function of Alteryx (which are heavily used within our workflows) we tried to trick this missing functionality via marco setup.
Hope our target goal is clear now, and hope this trick will work 🙂 in case if we find out how it might work
Dear All, wanted to let you all know,
So, we indeed were so close to the solution, but just mixed up first function on the macro - we used Macro In instead of Control Parameter 😞
So, after we replaced it in macro, it actually worked 🙂 So, we were also successful to build similar functionality to built output file using Environmental Variables 🙂
This capability opens up so much doors now, haha you can also benefit of it.
Kind Regards
Emil
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |