Within either a Cloud Flow or a Desktop Flow, is there a way to get the current runtime environment that the flow is being run in?
Use case...I have variables that need to be set based on environment and I would like to not have to alter the flow after deploying to a new environment.
Am I able to access the environment variable from a desktop flow?
Although the previous reply works, I would rather go for environment variables, since they provide the exact functionality that you are looking for:
https://learn.microsoft.com/en-us/power-apps/maker/data-platform/environmentvariables
Hi @BI_RPA_Andy
In Power Automate Desktop you can make use of the Windows environment variable explained in detail here.
Using Windows Environment Variables in Power Automate Desktop
Your answer seems to assume a level of familiarity with the platform that I do not possess. I will try to decipher what you mean and work through it.
Additionally, is there a way to obtain this information within Power Automate Desktop apart from an input variable? I would like to be able to set variables dynamically within a desktop flow independent of a triggering flow.
To get the environment "display name" you should use both workflow() and Get Environment as Admin action.
Get Environment as Admin required environment ID that you will get from : workflow()['tags']['environmentName']
Enviroment display name : body('Get_Environment_as_Admin')?['properties']?['displayName']
Please check following reference posts:
Regards
Krishna Rachakonda
If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone. |