web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Clear New Form after s...
Power Apps
Unanswered

Clear New Form after submitting a Patch

(0) ShareShare
ReportReport
Posted on by

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

Categories:
I have the same question (0)
  • Verified answer
    Andy_Tuke Profile Picture
    141 on at

    After the patch function, try NewForm(FormName) to set it back to new mode.

     

    Andy
    Read my new blog at -
    www.powerappssolution.com

  • Community Power Platform Member Profile Picture
    on at

    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.

  • Community Power Platform Member Profile Picture
    on at

    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_Tuke Profile Picture
    141 on at
    You mention using Patch? Are you not using SubmitForm to save the data back to your data source?
    What is the data source btw? I can knock up a demo app to get the concept working and attach it here tomorrow
  • Andy_Tuke Profile Picture
    141 on at
    I assume you have a New Item button, the OnSelect for that should call the NewForm function before you show/navigate to the form. Where and how we're you calling it?
  • Community Power Platform Member Profile Picture
    on at

    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.

  • Andy_Tuke Profile Picture
    141 on at
    My second blog post was going to be about look up columns in SharePoint actually. I planned to write that tomorrow so bear with me
  • Andy_Tuke Profile Picture
    141 on at

    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

  • Community Power Platform Member Profile Picture
    on at

    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.

     

    4-26-2018 7-36-21 AM.png

  • Andy_Tuke Profile Picture
    141 on at

    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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard