1

So I'm using power automate for the first time to build out a reservation system for 4 packages available for rent. This is my first time using power automate, but I figured a reservation system is a very simple problem to solve and I could get through it.

Simply, a customer fills out a microsoft form, their information gets put into a sharepoint list which triggers the flow. The flow checks if there is an available package, if there is one an email is sent to the customer to pick it up, we wait for an approval, if it's approved that the customer picked up the package the count of available packages is decremented by 1. We delay for the 3 days they rent the package, then send an email to the customer telling them to return the package. After approving that the customer returned the package, we increment the available package counter. Simple right?

Turns out Power Automate has no global variable system. Oh well, I'm going to use a sharepoint list as the source for the available package counter. Nope, if two people fill out a form within 30 seconds, the sharepoint list is accessed by both flows and data is lost. I can't turn off concurrency because Power Automate will hang for the 3 day delay.

Is there not a simple way of implementing any solution here? There's no option for a global variable, no option for turning concurrency back on for certain actions, no option other than implementing my own lock/mutex solution in Power Automate and resolving race conditions etc myself?

I feel like I must be missing something extremely simple.

4
  • 1
    did you actually test the scenario when two submissions are placed within short time? I have various solutions with SP backend where the same record is accessed almost simultaneously. SP is able to queue requests and reliably operate list items as counters. Commented May 8, 2024 at 7:41
  • I thought I had tested it pretty intensively and it does not work when two flows are running concurrently. It's possible I'm accessing or setting items incorrectly? I'm using the sharepoint get item trigger, then initializing a variable and then using set variable to set the value, then decrement variable and finally sharepoint update with no other triggers in between and I have concurrency errors. Commented May 8, 2024 at 15:06
  • I'm realizing that saving the sharepoint list value into a variable is probably where most of the issues are happening, I should perform the calculations using the sharepoint list connections. When that's not possible/more complicated data manipulation is required does anyone have any suggestions on how to proceed? Commented May 8, 2024 at 18:34
  • this post suggests that using the 'Data/Compose' action will eliminate the concurrency issues: powerusers.microsoft.com/t5/Building-Flows/… Commented May 9, 2024 at 8:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.