Notifications
Announcements
I have put:
UpdateContext({showDataField:true}) within the "onCheck" attribute of the "Yes/No" toggle
and put:
showDataField within the "Visible" attribute for the data field that needs to be shown.
Am i missing something? or should i be initialising the variable on onStart or using it within a different attribute?
Hi @PowerNovice
You don't even need UpdateContext. Just set the Visible property of the field to If(DropdownName.SelectedText.Value="Yes",true,false)
Hi @PowerNovice ,
To show another field based on the selection of a "Yes/No" toggle in Power Apps, using UpdateContext is a correct approach. However, ensure the following steps are correctly implemented:
Initialize the Variable: On the OnStart of the app or screen, initialize showDataField using UpdateContext({showDataField: false}). This sets the default state.
Set OnCheck and OnUncheck: In the toggle control's OnCheck, use UpdateContext({showDataField: true}). Similarly, in the OnUncheck, use UpdateContext({showDataField: false}).
Configure Visibility: In the Visible property of the field you want to show or hide, simply reference the variable: showDataField.
Save and Refresh: After making these changes, save and then refresh your app to ensure the changes take effect.
This approach should dynamically show/hide the field based on the state of the "Yes/No" toggle. Make sure there are no typos or syntax errors in your formula.
Hey,
i made a test and it worked.
i inserted a Text input control and a toggle.
For the Text input control i set the visible property to Toggle1.Value.
this shows my text input only when the toggle has the value "on".
please let me know if it helped and accept as solution if it did to help others 🙂
Hi,
Your reply got me thinking so i thank you. There is no attribute for "SelectedText" so i simply just checked the boolean value and checked whether it was true or false - true = yes / false = no.
Below is the solution.
If(DataCardValue63.Value = true, true,false)
Hi @mmbr1606 ,
appreciate the reply, i have now resolved the problem. That is a nice and easy way to do it.
Hi @Pro_User_365 ,
Yeh i continued to try that, but it wasnt working for me. So i did the below instead, and this works for what i need. Something simple. Thank you for your help and explanation.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268