Forum Discussion
Patrick Rote
Sep 18, 2020Iron Contributor
Are there any issues with multiple user writing to sharepoint list simultaneously, concurrency issue
Hi All, I'm in the process of putting together an app using powerapps. Are there any issues with multiple users writing to a sharepoint list at the sometime when using powerapps. This issue does ex...
Patrick Rote
Sep 23, 2020Iron Contributor
Thanks Chriss.
The one issue i'm facing now is when a user is in edit mode working on a record and another user at the same time clicks and edit an item
The record gets locked and the user has to close the window which means they would have to re enter there data again as they wouldn't be bale to save the record.
This issue is common with out of the box sharepoint list.
Does this occur in power apps?
If it occurs and have to put a logic to avoid this what would it be in powerapps?
The one issue i'm facing now is when a user is in edit mode working on a record and another user at the same time clicks and edit an item
The record gets locked and the user has to close the window which means they would have to re enter there data again as they wouldn't be bale to save the record.
This issue is common with out of the box sharepoint list.
Does this occur in power apps?
If it occurs and have to put a logic to avoid this what would it be in powerapps?
Sep 23, 2020
It anything, it'll overwrite with whoever updates last and you could see the previous data via version history, but this isn't ideal.
One way you might approach it is by creating a similar locking mechanism that set's an "inUse" bit on the list, that you set to 1 or true when you open an item in the app. Then remove it or set it false when you save or cancel / navigate away. The only issue I see here thou would be if someone closes the app without navigating away, you would need some form of "Unlock" or you could have a timer, say, IF inUse is true AND inUseTimeStamp is more than 15 minutes ago, allow the edit form to come up and reset the timestamp. You could even inUseuser as well. Anyway, you get the idea, you would have to just use a few fields and build it into the navigation etc. so you set flags right then and there quickly to prevent others from opening and when opening the items you get the current data at the time of open.
One way you might approach it is by creating a similar locking mechanism that set's an "inUse" bit on the list, that you set to 1 or true when you open an item in the app. Then remove it or set it false when you save or cancel / navigate away. The only issue I see here thou would be if someone closes the app without navigating away, you would need some form of "Unlock" or you could have a timer, say, IF inUse is true AND inUseTimeStamp is more than 15 minutes ago, allow the edit form to come up and reset the timestamp. You could even inUseuser as well. Anyway, you get the idea, you would have to just use a few fields and build it into the navigation etc. so you set flags right then and there quickly to prevent others from opening and when opening the items you get the current data at the time of open.
- Patrick RoteOct 01, 2020Iron Contributor
ChrisWebbTech Thanks for the reply.
i have actually created such a mechanism already using another list to track the users when they are in edit mode.
But tracking how the exit the page is a tough one (currently if they click the back button or click a specific link to go back its all good and it works) as they can just closed the browser (So i like the idea where you suggested to have a timer and if exist after certain time it automatically removes the user)Thanks for the idea 🙂
- Oct 01, 2020Awesome! Sounds cool!