Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

SharePoint Integration OnSave Formula

(0) ShareShare
ReportReport
Posted on by 517

Hi,

 

Can someone help me? I have a customize form in SharePoint List using Power Apps. I three forms which are FormScreen_New, FormScreen_Edit and FormScreen_Display. Now I need to change the OnSave formula which currently set to the default SubmitForm(SharePointForm1). I encountered error using Save button in SharePoint list when the form is in FormScreen_Edit. 

 

jaina_0-1636428194219.png

 

 

How do I set the OnSave action which can capture both FormScreen_New & FormScreen_Edit conditionally?

 

jaina_1-1636428340395.png

 

 

  • JohnSutherland Profile Picture
    JohnSutherland 9 on at
    Re: SharePoint Integration OnSave Formula

    Hi,

     

    I followed the powerapps.microsoft.com guide here which seems to work fine.

     

    If you do have issues, or you want to use a custom save button anyway, my suggested alternative to setting the default save button to "false", is to make it control the visability of your custom save button. This way you can use that custom save button as a "Confirm?" type button and avoid users thinking the default save button is broken. When you click new to create an item, there's no confirm button. When the user clicks save at the top, a (big red obvious) "Confim?" appears at the bottom (or wherever makes sense). You could even add extra notes to ensure the user double-checks their entries. Note: This only works if your intending on using the form(s) directly within the SharePoint list as they were intended and not iFrame embedding it elsewhere of course. If you did that, you'd have no save button!

     

    Basic example:

    • On the button set:
      • Visable to VariableSaveButtonVisable
      • OnSelect to SubmitForm(yourformname)
    • On the SharePointIntegration set:
      • OnNew - Set(VariableSaveButtonVisable,false)
      • OnSave - Set(VariableSaveButtonVisable,true)
  • jaina Profile Picture
    jaina 517 on at
    Re: SharePoint Integration OnSave Formula

    I have different screens since there are conditional formulas when it comes to required and visible function per screen.. I already has submit buttons per screen. It just that the user has confusion since there is already a buttons presented in sharepoint such as save and cancel button... 

     

     

    but anyway, thanks for suggesting to make OnSave false value.

  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 144,609 on at
    Re: SharePoint Integration OnSave Formula

    Hi @jaina ,

    First, conditional formulas in SharePoint Integrated controls, particularly on Multi-screen apps have a habit of not returning the expected result, particularly when you try to base the formula on Variables. They were simply not designed with this in mind. Also why are you using separate screens - the three functions can be done with one.

    I generally treat anything multi-screen as a canvas app and provide the users buttons for (in particular) save and simply disable OnSave by making it false.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,609

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,420

Leaderboard