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.
Solved! Go to Solution.
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
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.
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Your chance to join an engaging competition of Power Platform enthusiasts.