Skip to main content

Notifications

Community site session details

Community site session details

Session Id : nfOD9i7LAPGvd0hBOzY/f9
Power Apps - Building Power Apps
Unanswered

Handle concurrent access inside Power Apps for SubmitForm() & Patch()

Like (0) ShareShare
ReportReport
Posted on 19 Mar 2024 19:50:09 by 1,542 Super User 2024 Season 1

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

 

 

  • johnjohnPter Profile Picture
    1,542 Super User 2024 Season 1 on 20 Mar 2024 at 10:41:21
    Re: Handle concurrent access inside Power Apps for SubmitForm() & Patch()

    @WarrenBelz yes seems the submitform will handle this , but using Patch will not.. so i will add the logic when doing the Patch()

  • WarrenBelz Profile Picture
    146,745 Most Valuable Professional on 20 Mar 2024 at 02:59:31
    Re: Handle concurrent access inside Power Apps for SubmitForm() & 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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started