I am working on a Canvas application which is connected to SharePoint online lists and libraries. and i mainly use these methods to edit data:-
1) SubmitForm()
2) Patch()
currently there is not any mechanism to handle concurrent access, where currently if 2 users access an item to edit it, they both can save the form and the last user who submit the form will have his/her data inside the SharePoint lists. so is there a way to allow power apps canvas application to handle concurrent access, so it will show an error to the second user that the data he/she is viewing has been modified since it was retrieved?
I am thinking of doing a check before submitting or patching an item, where i will check the current item modified date with the modified date currently on SharePoint (by doing a LookUp()), if the modified are the same i will proceed with the submision if not then this mean that the item was modified since it was viewed... i am trying to avoid this manual method, and find a way to allow power apps to do this out of the box? is there a way?
Thanks
@WarrenBelz yes seems the submitform will handle this , but using Patch will not.. so i will add the logic when doing the Patch()
Hi @johnjohnPter ,
What you have posted is exactly what I do - lookup the modified date/time and compare it to the item current in the Form. Also (if you do not do this) the user using SubmitForm will generally get an error indicating that "a conflict exists with changes on the server", but it is obviously better that this does not happen.
To answer your question, there is no OoB process that controls this.
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.
MVP (Business Applications) Visit my blog Practical Power Apps
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional