Hello,
I am fairly new to PowerApps. I have created a canvas app that will allow users to enter their shifts and have it stored in a collection. They can enter multiple entries and can view all of their specific entries before writing it to a sharepoint list. Here is where I am running into an issue. When multiple users access the app and enter their info, they will only see theirs, but can inadvertently post someone else's shift if it is in the collection.
Example:
Victor and David add two shifts to the collection at the same time. If Victor submits before David, both records get written to Sharepoint. I want Victor to only be able to submit Victor's shift if this is possible.
This is how I have my gallery wired up to filter the collection:
Filter (MyCollection, EmployeeName = varUser.FullName)
And this is how I have my submit button wired up:
ForAll(MyCollection, Patch('Sharepoint_List', Defaults('Sharepoint_List'), {Title:"Default Text",Status:"Default Text", Employee_Name:EmployeeName, Location:Location, Start_Date:StartDate, Start_Time:StartTime, End_Date:EndDate, End_Time:EndTime, Type_of_Hours:TypeofHours, 'Notes / Comments':Notes})); Clear(MyCollection); Notify("Success",Success,2000)
Any assistance would be greatly appreciated.
Thank you,
VicA26