cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cooper33
Level 8

PowerApps form resetting fields on Save

I have a SP Online list that I created a custom PowerApps form for. The form has several sections which are shown and hidden based on the value of a hidden status field

 

When I fill out the third section only and click the default Save button on the top left of the form, sometimes the required fields that I just filled out show the error message "An entry is required or has an invalid value. Please correct and try again" and their values are deleted. The non required fields do not show the error message but their values are also deleted. The types are 4 date fields (3 required, 1 not), 2 single line of text fields (1 required, 1 not), and a choice field. It's only happening for the third section being filled out

 

I know that the form is failing because in the OnFailure section of the form I have a Notify message saying it failed. However all my required values are there and the formats are correct

 

Has anyone come across this? I am using version 3.19012.19

 

Update: I added the form error to notification method. Error message is "Conflict exists with changes on the server, please reload. Server Response: ETAG mismatch. clientRequestId: ... serviceRequestId: ...

In this thread I found a suggestion to use Refresh('Data Source Name') after Submitting the form in OnSave. This did not work

1 ACCEPTED SOLUTION

Accepted Solutions
cooper33
Level 8

Re: PowerApps form resetting fields on Save

I think this problem was mainly being caused by the overuse of Flows. I had several Flows all called On Item Update on the same list and a lot of their last actions was updating a status field, therefore triggering all the Flows again. So if users were quickly updating the same item repeatedly (which they were) it would cause this server error. I simplified the Flows by making one large instead of several smaller ones so there was less of the item bouncing around in the update state. I also added a Modified column to the users' main view and told them to wait until it didn't say A few seconds ago. Not a great solution but updates were faster once a lot of the Flows were eliminated

I did try changing the Refresh to before Submitting instead of after which just caused a different error. Did not try Patch instead of Submit

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: PowerApps form resetting fields on Save

Hi @cooper33,

Based on the error message that you mentioned, I think you have faced a ETAG mismatch (Conflicts exist with changes on the server) error within your app.

The user @karl has faced same issue with you, please check the response within the following threads:

https://powerusers.microsoft.com/t5/General-Discussion/Server-Response-ETAG-mismatch-Conflicts-exist...

 

Please take a try to add the Refresh('YoursSPList') function before your SubmitForm function rather than after. E.G. Set the OnSave property of the SharePointIntegration control to following:

Refresh('YourSPList');  /* <-- Add this formula */
SubmitForm("SharePointForm1")

 

In addition, you could also consider take a try to submit your form data using Patch function instead of SubmitForm function. Please take a try with the following formula:

If(
   SharePointForm1.Mode = FormMode.New,
    Patch(
             'YourSPList',
              Defaults('YourSPList'),
              SharePointForm1.Updates
    ),
    Patch(
             'YourSPList',
              SharePointIntegration.Selected.
              SharePointForm1.Updates
     )
)

please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
cooper33
Level 8

Re: PowerApps form resetting fields on Save

I think this problem was mainly being caused by the overuse of Flows. I had several Flows all called On Item Update on the same list and a lot of their last actions was updating a status field, therefore triggering all the Flows again. So if users were quickly updating the same item repeatedly (which they were) it would cause this server error. I simplified the Flows by making one large instead of several smaller ones so there was less of the item bouncing around in the update state. I also added a Modified column to the users' main view and told them to wait until it didn't say A few seconds ago. Not a great solution but updates were faster once a lot of the Flows were eliminated

I did try changing the Refresh to before Submitting instead of after which just caused a different error. Did not try Patch instead of Submit

View solution in original post

Highlighted
IrhanC
Level: Powered On

Server Response ETAG mismatch

The issue occurs when you have Submit form and a patch function on the same screen ..The fix is use a temp data table  - I can show you guys how its done  - let me know 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,292)