cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
udayrnair
Level: Powered On

Bug : Sharepoint and PowerApps

Hello PowerApps team, 

 

I am ruuning out of ideas for this one. 

 

Context : I have built a PowerApps solution using a Sharepoint List data source .I have a Submit Button which has been set to SubmitForm1(formname2);SubmitForm2(formname2).

 

Issue 1: When my users click on the Submit button, some times the data they have submitted is lost and reverts back to the old data set. And some times when they click submit they get an error " There was a problem saving your changes. The data source may be invalid". And furthur error "Conflicts Exist with changes on the server, please reload. Server response : ETAG mismatch. ....".

 

Based on some of the response I saw, we added a fix Refresh('DataSource');SubmitForm1(formname2);SubmitForm2(formname2) for Submit button. It seemed to have fixed but now we are getting the same error again. 

 

The first time we saw the issue was when we submit a data chosen by the user using the data picker. The time zone was set to local. 

 

Also would like to point out there were times when we got the above error, when refreshed the page the values were present in the form. 

 

PLEASE HELP !! 

 

 

13 REPLIES 13
Dual Super User
Dual Super User

Re: Bug : Sharepoint and PowerApps

Why are you submitting the same form twice?  Your problems all stem from the asynchronous nature of submit and the fact that it inherently causes a refresh.  That's why the errors are intermittent. if the first submit is too fast or too slow then it interferes with the second. For complex updates you should probably be using Patch() which provides more control.  But if you will explain your intent I'll try to help.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
udayrnair
Level: Powered On

Re: Bug : Sharepoint and PowerApps

 @Pstork1 Apologies if it meant I am submitting twice I am not.

 

When I put in the data and click submit, the form just blanks out almost instantly. 

 

The update is just 2 dates chosen by the user from the date picker. 

 

Also dont know if this has anything to do with it. Upon inspect, I am seeing an https://europe-001.azure-apim.net/...404 error

 

 

Dual Super User
Dual Super User

Re: Bug : Sharepoint and PowerApps

There may be issues in europe, but that's not your problem. If you want to update just two dates then you should be using patch() not submit.  Submit submits the entire form, and that's why you are getting conflicts.  Here's the documentation on Patch()

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
udayrnair
Level: Powered On

Re: Bug : Sharepoint and PowerApps

@Pstork1 But the form only has 2 items in it the two dates and a RAG status. Also the error has started only in the last 3 weeks. The application has been running for the last 7 months.

Dual Super User
Dual Super User

Re: Bug : Sharepoint and PowerApps

The point is that the error is all based on timing.  With only two items on the form its not a big suprise that it has worked in the past. But submitting the same form twice in succession on a single button click is a very bad design and will eventually lead to errors.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
udayrnair
Level: Powered On

Re: Bug : Sharepoint and PowerApps

@Pstork1 I am having this error when I click it once. Is there anything else that could be giving that error. I can assure you there is no double click here.

Dual Super User
Dual Super User

Re: Bug : Sharepoint and PowerApps

Sorry, I wasn't saying there was a double click.  I was saying that in that one onselect statement you are processing the form twice.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
udayrnair
Level: Powered On

Re: Bug : Sharepoint and PowerApps

Hi @Pstork1 this error seems to be stemming into other places as well. Where I am not submitting anything. Even when I do a simple search in the search box I am getting this error. 

Dual Super User
Dual Super User

Re: Bug : Sharepoint and PowerApps

Sorry, I don't understand.  You said the error message was that your changes couldn't be saved.  Why would you get that kind of error if you aren't trying to submit (save) anything.  As I've said all along.  Your original onSelect is submitting the form twice.  That is the cause of the original error.  Its not a bug.  Its bad coding.  If you don't want to believe me feel free to find another answer.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

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
Users Online
Currently online: 80 members 4,374 guests
Please welcome our newest community members: