Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

ResetForm resets form controls but not field visibility

(0) ShareShare
ReportReport
Posted on by 101
Hi everyone
 
In my app I've got a form linked to a SharePoint list.  This form contains a number of Y/N fields where if the user changes the value to Yes a previously hidden field will then display.  The example below shows that if the user selects Yes for a load being carried then a text box field called Load Carried will appear:
 
 
If the toggle is left as No then the user never sees the Load Carried field.  The code being used in the Visible property for the above field is simply tog_LoadCarried.Value
 
This works fine the first time a user opens the app and submits the form.  However, if they then go back into another item or create a new item using the same form, the toggle controls in the form all change back to No but the corresponding text fields are still visible.  If I change the toggle to Yes and then back to No they disappear.  I'm using the ResetForm command when the form is being opened, whether that's in edit or new mode.
 
This is strange because I've used this method of controlling field visibility in forms and can't remember coming across this issue before.  I'm not sure if something has changed?
 
I'd be grateful if anyone could tell me if they've come across this issue before, and whether it is something that used to work but now does the above as I'm doubting myself :-)  The only workaround I can think of is to set the default value of each toggle as a variable and use that to reset the toggles every time the form is opened.  However, there are quite a few toggle fields and I don't want to have to do this unless there's no other alternative.
 
Thanks in advance for any help you can give.

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard