Forum Discussion
Make field visible depended on other field - Powerapps
Hi,
In the OnVisible property of your screen, create a Context Variable and set it's value to false.
UpdateContext({cVisible: false})
Then set the calandar controls Visible property to to the context variable, in this example that would be cVisible
On the check box control set the OnCheck property to update the Context variable
UpdateContext({cVisible: true})
You can reset the context variable in the checkbox OnUnCheck property to reset as well
to get a toggle effect.
UpdateContext({cVisible: false})
Hope this helps.
- JRoMeAug 31, 2017Copper Contributor
I was looking in to how to use the Visible because it isn't straight foward when I started to think it's going to need to be set on the page load. Then I saw you had it all spelled out. NICE! thank you (Y)
- Rodney CraigoSep 02, 2017Brass Contributor
Hi Jerome,
Your welcome.
I'm gald you found this useful.
- RLUGOFeb 06, 2023Copper ContributorHi Rodney,
Have you used this capability with multiple checkboxes? I have a set of checkboxes within a gallery, but it only shows as checkbox1 so I'm not able to reference the rest of the checkboxes. Could you offer any insight on this?
- Henrik Stentebjerg TobiassenMar 14, 2017Copper Contributor
Hi Rodney,
Thanks for your input. Can you maybe sent a screenshot, because I can not get it to work.
Thank you- Rodney CraigoMar 14, 2017Brass Contributor
Create a Context Variable in the OnVisible property of your Screen
Set the Visible property of the Calendar control to the Context Variable
Change the Context Variable accordingly with the OnCheck and UnCheck properties of your Toggle Control.
Hope this helps.
Keith
- Henrik Stentebjerg TobiassenMar 27, 2017Copper Contributor
Thanks! It is working. Only problem is that it is affecting all the dates when I check/uncheck. Can it be done so it only affect the relevant date on the record it belongs to?
- Dan WilcoxDec 08, 2020Copper Contributor
Rodney Craigo this was a big help to me. It's exactly what I needed. Thank you!
- becarioitFeb 02, 2021Copper Contributor
Rodney Craigo THANK YOU SOOO MUCHHH¡¡¡¡¡¡¡¡¡¡¡
IT WORKED REALLY WELL FOR ME!!!!!!!!!!
- bpraterJun 18, 2021Copper ContributorThis is awesome, learnt something today.
- MarcoNardiJan 19, 2022Copper Contributor
These were short and sweet instructions! Very elegant!!!
I modified this to work on a search box, hid the gallery until something was entered on the search box. Turned on a loading icon until data was retuned. It worked really well!
Thank you.
- DoomglazerApr 05, 2022Copper ContributorMarcoNardi
Im looking exacly for what you have modified. Could you share the code with me?
Thanx in advance