I have an application that Gets the next submission number based on the value of the last ID of a list.
There have been a few situations when two submissions have the same submission number due to the fact that person "A" Creates a new Submission, but before they can submit the submission, person "B" also creates a submission and becuase person "A" has not submitted their submission, they get the same Submission number.
So to pevent this, when a person creates a new submission, I immediately create the record using Patch. Then when the person submits their submission I use SubmitForm to submit the submission with all of the data in it.
I have two problems as result of using this method :-
1) When two people start the PowerApp at the same time to create a submission, I get two submissions with the same SUbmission number.
2) I sometimes get two records with the same submission number, one for the Patch and one for the subsequent SubmitForm.
a) is there a better way of doing this ?
b) How can I get an ID into a submit form so I dont get two submissions with the same Submission NUmber - becuase the SubmitForm thinks that this is a new Submission, rather than updating the current Submission created as a result of the PAtch command ?