Hello,
I want to display some fields only if my toggle button is enabled
So I put in visible of my screen :
UpdateContext({aVisible: false})
In the visible of my fields
aVisible
And in visible from my toggle button
Switch(DataCardValue50.Value;true;UpdateContext({aVisible:true});UpdateContext({aVisisble:false}))
But it doesn't work and I don't understand why 🤔?
Solved! Go to Solution.
change the visible of the toggle back to true as the switch to update the variable should not be there 🙂
Now there are two ways to do the next step the first is this:
make the OnChange Property this:
UpdateContext({aVisible:Self.Value})
this is the quickest way
the other way is to make the
OnCheck Property this:
UpdateContext({aVisible:true})
and the OnUnCheck property this:
UpdateContext({aVisible:false})
If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Hi @Fa1con74 ,'
Assuming DataCardValue50 is your toggle control, the Visible of your controls simply needs to be
DataCardValue50.Value
If you want to keep running with the Variable, do this
UpdateContext({aVisible:DataCardValue50.Value})
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
change the visible of the toggle back to true as the switch to update the variable should not be there 🙂
Now there are two ways to do the next step the first is this:
make the OnChange Property this:
UpdateContext({aVisible:Self.Value})
this is the quickest way
the other way is to make the
OnCheck Property this:
UpdateContext({aVisible:true})
and the OnUnCheck property this:
UpdateContext({aVisible:false})
If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Hi,
On the Visible property of the field for which you want to hide and show, you can directly specify the ToggleField.Value or if(ToggleField.Value, True, false).
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
199 | |
71 | |
51 | |
42 | |
30 |
User | Count |
---|---|
268 | |
121 | |
94 | |
90 | |
81 |