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.
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?
- Rodney CraigoMar 28, 2017Brass Contributor
Hi Henrik,
In this case you don't need the Context Variable, just set the Visible property of your date control to the toggle button name
- Kamna LohiaApr 26, 2018Copper Contributor
Hi Rodney,
I have recently started learning powerApps and i came accros your solution to make a column visible based on the value of another column/field.
I am currently looking to know about about the visible property screenshot you had shared. In my screen the visible property is a toggle button (screenshot attached).
Can you please tell me how I am supposed to set the variable i.e. cVisible for this column?
Thanks for your help.
- Kamna LohiaApr 30, 2018Copper ContributorI am now able to set cVisible in the Visible property under Advanced tab. All sorted now.
- Ethan MarchandOct 17, 2018Copper ContributorThanks you it's work perfectly