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 / Customized SharePoint ...
Power Apps
Answered

Customized SharePoint Form - How to trigger OnSave?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

On a customized edit form for a SharePoint list, is there a best practice to trigger form save from the designer?  I have some complex save code.  I tried adding a hidden button and call Select(button) from the SharePointIntegration.OnSave property, but it didn't like that.  Seems like I must be missing something as I would think something like this would be needed.

Categories:
I have the same question (0)
  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi @Anonymous 

     

    Would using the 'OnSuccess' property of your form be suit your use-case?

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

    @Anonymous 

    You will not be able to Select a button that is not in the current scope (the screen) as the SharePointIntegration object is outside of that.

    Your save formula should essentially just be SubmitForm(yourForm).  Avoid putting anything after it and put and formulas that need to occur after the save into the OnSuccess action of the form as mentioned by @AmDev 

     

    If you have some sort of pre-checking that is going on prior to doing the SubmitForm, then consider making that part of your form interface rather than doing it at the time of submit.

     

    If ALL else is not available, the only real way to implement this is to put your Formula into the OnCheck property of a toggle control (hidden) on your screen.  Set the Default of the Toggle to: glbSubmitForm and then in the OnSave action of the SharePointIntegration, put in a Set(glbSubmitForm, true)  

    Make SURE you put in a Set(glbSubmitForm, false) at the end of your OnCheck action of the toggle or the toggle will never "fire" again.

     

    I hope this is helpful for you.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I'll give this a try.  When I submit the form I need to update multiple SharePoint lists.  I'll move that code to OnSuccess and see how it goes.  Thanks.

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 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard