cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jaina
Resolver II
Resolver II

SharePoint Integration OnSave Formula

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

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

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

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

jaina
Resolver II
Resolver II

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.

JohnSutherland
New Member

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)

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,919)