Powerapps Visible function
Solution 1:
You need to create a variable in the button's (or another control) OnSelect
property:
UpdateContext({ mailVisible: false })
And set the Visible
property of the Mail
control to mailVisible
. You may need to initialize that variable to true
, for example, in the screen's OnVisible
property:
UpdateContext({ mailVisible: true })
PowerApps works similarly to Excel - you cannot, by an action, change directly the value of a cell (e.g., A1 = 42
). But you can make the A1 cell reference another cell (say, =A4
), so when you change the value of the cell A4
, A1 will be updated as well. The same principle applies in PowerApps - you cannot change the value of a property from an action, but you can update the value that the property references.
Solution 2:
Credit @SeaDude
This worked perfectly for me toggling the variable back and forth to show/hide a few layers.
Set(mailVisible, !mailVisible)