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

How PowerApps handle multiple users writing to same Sharepoint List?

Hi,

 

This is my first post in PA community.

 

I will like to find out how PA handles when multiple user (e.g. User A on laptop A, User B on laptop B) writing to the same data source.

 

Currently I am building an App connecting to a Sharepoint List as a data source. There are 3 columns - Title (using it as a unique ID), Firstname, Lastname. Let say my Title needs to be a unique running format (e.g. 2018A01, 2018A02...).

 

The App is able to patch data into the Sharepoint list with the 'autoincrement' ID. My concern is, how do I ensure that when the App is used by different devices (e.g. User A on laptop A, User B on laptop B), the patching of the 2 records can still generate a unique ID before patching, assuming they press 'Save' button at the same time?

 

As expected, when 2 devices assessing the App for data entry screen, both screen give me the same generated ID that is assigned for patching. I only have a simple error handling, where just before patch it checks if this generated ID that is supposedly assigned for this new record is already in the Sharepoint List. If not found, just patch. This does not eliminate if 2 'Save' buttons are pressed at the same time.

 

Any workarounds for this type of concurrent patching by different users from different devices. Ideas are welcomed.

 

Thank you.

7 REPLIES 7
Anonymous
Not applicable

Re: How PowerApps handle multiple users writing to same Sharepoint List?

Hello.

 

I use an app that has 3 multiple users at the same time...But in my case is very difficult that they all fill and submit the form at the exactly same time, so in my case I did an auto refresh with timer (90 seconds) and also a button for them to refresh when someone submits something....

 

I did not tried yet to submit multiples forms at the exactly same time, this is a interesting thing to try on PowerApps 🙂

 

paquery
Level: Powered On

Re: How PowerApps handle multiple users writing to same Sharepoint List?

Hi @Anonymous,

 

Yeah, that's the main concern actually. Because as part of a testing for multiple users submitting at the same time, it is possible to have a corruption in that sense.

 

I wonder if there are any ways to control the App, for example, have 1 user to patch at one time to a data source?

This could eliminate the issue.

 

Thank you.

Anonymous
Not applicable

Re: How PowerApps handle multiple users writing to same Sharepoint List?

I guess, with my understanding (I may be wrong) and experience with PowerApps, the APP will submit the one that is faster, then the other one will be submitted after with no problem....

But, it is worth a try with this scenario...

 

Maybe some MS Employees can help us in this case (Y)

Community Support Team
Community Support Team

Re: How PowerApps handle multiple users writing to same Sharepoint List?

Hi @paquery,

How do you want to save your data into your SP list data source? Using SumitForm function or Patch function?

Do you mean that multiple users submit data into your SP list data source (same data source) at the same time?

Currently, within PowerApps, I don't think multiple users could submit data into a same data source at a actual same time.

I assume that multiple users could submit data into a same data source at a actual same time, but the Conflict error would show up. It would prompt you that another user is manipulating this SP list data source, you should try your operation later, or a unknown server error.

If you want to control the app to have only 1 user to patch at one time to same data source, I afraid that there is no way to achieve your needs in PowerApps currently.

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Kris

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.
paquery
Level: Powered On

Re: How PowerApps handle multiple users writing to same Sharepoint List?

Hi @v-xida-msft,

 

Currently I'm using Patch function for submitting data from PowerApps to SP list. Based on my simple testing on a laptop (web) and a iOS PowerApp, so far I have not see a SP conflict mention in PowerApps.

 

Just a note on the response on iOS PowerApps vs. Web. If I press the button at the same time on both, it hasn't resulted in creating 2 items in the SP list with the same autogenerated ID (e.g. 2 records with ID 2018A03 although they are different Firstname and Lastname), as I think somehow the web is faster to process. So in order to create that 'corruption' on the ID generation, I have to press Save button in iOS about ~0.5s faster than the web 🙂

 

Just to illustrate what I am doing in PowerApps:

- When user navigate to the data entry screen, it shows the last entered record unique ID (e.g. 2018A02). It will shows the assigned ID for this new incoming record as 2018A03.

- If 2 users are now in the navigate screen, since no new record has been submitted yet at this moment, both device will show assigned ID as 2018A03.

- To Patch data into SP list, 2 users Save data in PowerApps. My Save button has a series of action > it checks if 2018A03 is existed in the SP list, if not, it Patch record with ID 2018A03 with Firstname and Last name in SP list; if yes, it shows the Label that ID existed, and show a button to refresh to retrieve a new assigned ID before allow Save data again.

 

So with the simple error checks, it is still not able to catch that SP list has a new record with the assigned ID taken by the new record. Now the SP list has 2 records of the 2018A03, which is a 'corruption'. I believed this show that SP does allow multiple adding items at the same time. Correct me if I am mistaken on the SP behavior 🙂

 

Now I added a next screen to get user to check if the written ID is successful (i.e. if the ID appears 1 time in the SP list). If it is only 1, it is good. But if 2 or more occurs, it populates the filtered same ID record on a Gallery. User manually select the record they entered (i.e. based on Firstname and Lastname), refresh the SP list again to generate the reassigned ID, and Patch to update the record's ID with this new reassigned ID.

 

I am still testing screen, although it solves the corrupted ID issue by getting user to manually reassign, but I think this error check may also not be extensive also... Should the ID generated be done by SP list instead, through Flow or SP Workflow?

 

With regards to having users patch to the same data source one user screen at one time, it is just a thought to eliminate the potential adding records with the ID generated. If the above use case and observation is valid, I am more than happy to submit as a feature request.

 

Thank you.

jesusaguirre
Level: Powered On

Re: How PowerApps handle multiple users writing to same Data List?

Hello

I found the same problem when inserting data in a source and pressing the button at the same time in the different devices (User 1, User 2), I inserted all the data but in a table I repeated the ID, it could be solved only allowing a user at the same time or is there a solution to fix this problem?

Highlighted
KamilHCP
Level: Powered On

Re: How PowerApps handle multiple users writing to same Sharepoint List?

Hello,

 

I'm having the same problem with my app. Two, or three users can use patch function to change on field in my sharepoint data. Is there any solution for this? Mayby I should change the sharepoint to other database? Would that help? 

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: 200 members 5,151 guests
Please welcome our newest community members: