Hi,
I have a dataverse table with a column called "Environment" which is a Choice field with the following values:
Name - Value
Convenience = 1
Cafe = 2
What I'm trying to do is if the Environment value of a record equals 1 (convenience) then to hide a form. This is the code I'm using but it doesnt seem to work and no error is provided.
If(varRecordID.Environment = 1, range_conv.Visible = false);
varRecordID is the current record. What am i doing wrong here?
Any help would be much appreciated, thank you.
Hi @CCEP_Mike
You can set the .Visible of range_cov like that. There are multiple ways to solve this issue:
One way is to use UpdateContext() instead:
If(
varRecordID.Environment = 1,
UpdateContext({varRange_conv: false}),
false
);
And then in the Visible property of range_conv add the new variable varRange_conv.
Another way is that you directly add the formula in the Visible property of range_conv:
varRecordID.Environment <> 1
This will generate a boolean and make you control visible or not.
If you have any questions or feedback, please let me know. Have a great day! 😊
-----------------------
PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473