
Announcements
Hello Power Platform Community,
I'm currently working on developing a tool for event registration and have encountered some challenges that I'm hoping to get some help with.
To give you some context, I've created a PowerApp that serves as the interface for event registration. Users can register for an event by clicking a registration button, which then adds their name to a multi-person field, effectively signing them up for the event.
Behind the scenes, there are two workflows in operation:
1. The first workflow is triggered whenever a new item is created in the Events list. It checks if a link for the event has been provided; if not, it's considered an internal event. For these, I generate a PowerApp deep link to my app, update the item, and adjust the write permissions on the element. This part of the process is running smoothly and without errors.
2. The issue arises with the second workflow, which is triggered by any changes to an item - for example, when a participant registers or deregisters. This workflow detects the change and identifies the last person who edited the item. It then makes an HTTP request to the Outlook event to fetch the current list of participants.
If the participant is not already listed or if the participant list is empty, the person is added to the Outlook event's participant list via another HTTP request. Conversely, if the list is not empty and the person is already listed, they are removed, assuming they are deregistering.
While this generally works well, problems occur when multiple people register around the same time, leading to a failure in triggering the flow correctly and resulting in patch/network errors. This is likely due to SharePoint still processing the write operation from a user who clicked just a moment earlier.
As an alternative solution, I considered creating a second list. Instead of the registration button in the app adding a user directly to the participant column, it would create an entry in this new list. However, this approach also faces challenges, especially when two users click the registration button simultaneously. The HTTP request only checks who is already listed, so the second flow doesn't recognize this and may overwrite the entry added by the first flow once it completes.
I've included some screenshots to clarify my setup and the issues I'm facing. If anyone has insights or solutions to these concurrency issues, I would greatly appreciate your advice.
Thank you in advance for your help!