Hi,
I have an App which users send commissions to my team, via a form in the App. I use the ID column to generate a unique reference number, which on submission of the form writes the reference to 'Workplan Reference Number' column in my SP list, using the code below...
If(
varTabSelected = 1,
"LST" & Last('DLD Team Commissions').ID + 1,
"" Or varTabSelected = 2,
"PPT" & Last('DLD Team Commissions').ID + 1,
"" Or varTabSelected = 3,
"LST" & Last('DLD Team Commissions').ID + 1 & "CR",
"" Or varTabSelected = 4,
"PPT" & Last('DLD Team Commissions').ID + 1 & "CR", SubmittedGallery_2.Selected.'Workplan Reference number')
This works fine, but, the problem is, if two users as in the form at the same time, they would both have the same ref, and only the first one to submit would submit the form successfully, then second person would have to restart.
Any ideas how to resolve this? Btw, I appreciate my code may not be the best, I am quite new to the world of PowerApps.
Thanks