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 !!
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.
@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
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()
@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.
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.
@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.
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.
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.
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.
Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
Did you miss the call?? Check out the Power Apps Community Call here!
ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.