Notifications
Announcements
Is there a quick and easy way to clear a form after a successful Patch save? I have not found anything yet, except that the issue might lie in the fact that this is tied with a SharePoint list.
Thanks
Brad
After the patch function, try NewForm(FormName) to set it back to new mode.
AndyRead my new blog at -www.powerappssolution.com
Thanks and I figured it would be something very easy. My developer mind is thinking that New Form is going to also create a new blank empty record, which I wouldnt want.
And sadly, I just tried that and when I go to add a new record, the prior ("session") information is there. I was hoping it would clear all the fields. Wish there was like a Form.Clear() function
Andy:
I was using Patch because I have two lookup fields, which are a PITA 🙂 That is the only reason I was not using Submit Form really. The data source is a SharePoint list. And yes, I have a (+) icon to add a record, which created a NewForm then navigates to the screen with that form. I also am running this in Edge (not IE or Chrome) and I have not tried it yet in any other browser, so maybe that could be why? I am sure I could one-by-one call something like Control.Text="" too.
Final thought, you are talking about using a Form but then saving the data with a Patch command. Are all your fields in the Form control or have you separated the LookUp columns into their own controls displayed next to the form?
I'm trying to picture how you've done this as the NewForm will work for the form, so I'm guessing you have some controls outside the form itself so arent getting reset
The Screen only has a rectangle with a label to serve as a header. All other controls are in the form as data cards. Here is a screen capture of the form I am talking about. And this morning I rebooted the laptop so of course now, all prior data is cleared.
Is it all the fields that retain the previous data or just the look up based ones?
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 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268