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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Form action OnSave mis...
Power Apps
Unanswered

Form action OnSave missing when customizing SP List form in PowerApps

(0) ShareShare
ReportReport
Posted on by 195

OnSave action of my list form SharePointForm1 is not present when customizing list form in Powerapps.

*Requirement is to Patch a collection with SP List with the Form's  OnSave functionality (separate save button is not required)

 

Snap 2021-07-29 at 00.08.38.png

 

Snap 2021-07-29 at 00.08.53.png

 

Guidance will be much appreciated?! @WarrenBelz @BCLS776 @CNT @RandyHayes @Drrickryp @timl @Pstork1 @Anonymous 

Categories:
I have the same question (0)
  • GarethPrisk Profile Picture
    2,828 on at

    There is no OnSave property on a Form.

    You might mean OnSuccess which is the hook you can use for when the Form is submitted successfully.

    The others may be helpful too:

    • OnFailure - to do something if it fails to save
    • OnReset - to do something if/when you need to reset the Form

     

    To initiate the Form to "Save", you would use SubmitForm(FormName)

  • amk1421 Profile Picture
    195 on at

    @GarethPrisk How do we trigger SubmitForm(FormName) via the default Save button of List form? 

    In my case OnSuccess of the form "SharePointForm1" may create an empty item row apart from the required operation. A list item ID will be generated unnecessarily. Also form validations may fail and OnSuccess may never be called... Is there any workaround to meet the requirement?

  • GarethPrisk Profile Picture
    2,828 on at

    Clicking the Save button on a SharePoint-based Power App, will cause the app to SubmitForm() for the given form.

    There are several assumptions

    • You have extended the List, using Power Apps, to customize a "Form" for it
      • This is then generated automatically
      • This includes the SharePointForm integration object
    • This is the built-in App/Form for the List, and is shown when you click 'Open' for a record, or New
    • The Form automatically has its properties set
      • It knows the List you're on is the DataSource
      • It knows the Item you've "opened" is the Item
        • If it's blank, then it tries to use the first record in the list (i.e. Studio editing)
      • Somehow, it knows to switch the EditMode - not sure
    • When you click Save on the button outside the form/app
      • It appears to SubmitForm for the Form
      • It also runs that code, which is special to the SharePoint form to try to hide it
        • ResetForm(Self); RequestHide()

     

    You can confirm this by replacing the OnSuccess for the Form, with something like Notify("Save Was Clicked"); to confirm it is invoked.
    Any required fields/validation is still checked, when clicking Save. It assumes you have required columns, or have added custom validation logic.

    GarethPrisk_0-1627505463204.png

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @akg1421 

    OnSave is not on the form.  It is on the integration.  Click on the SharePointIntegration object in your control tree and you will find OnSave there.

    RandyHayes_0-1627506050133.png

    I hope this is helpful for you.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 462

#2
WarrenBelz Profile Picture

WarrenBelz 425 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard