I created a new button with the new command designer. I would like to make this new button visible/invisible based on an environment variable value.
It's possible to set the visibility using Power FX based on some conditions:
But I couldn't find a way to get the value of the environment variable value using Power FX.
Can anyone help me with that?
PS: I'm also open to other approaches.
This was really helpful thanks!
Hi @melamri,
that works pretty fine. Thanks a lot!
Hi,
You need to add two additional tables: Environment Variable Values and Environment Variable Definitions. To do this, you need to open the component library:
Then you can the two tables (Environment Variable Values and Environment Variable Definitions):
Also in the component library. You can now use a powerFx expression for the visibility of the button depending on the value of your environment variable. In my case, the environment variable is "mea_BtnVisibilityEV"
You will need to save and publish your component, like a canvas app component. Then, close everything and reopen the command designer, the visibility expression will now be inherited from the command library:
It works in my environment (y)
Please tick Accept as solution if the answer is useful.
https://xrmtricks.com/