i have a sharepoint form where user can request home office or holiday. Once he submits a flow starts which deducts the requested days of holiday from his "vacation days" and asks the manager for approval, if he approves all good, if rejects, days are set back...
the problem i see is that if he makes two quick requests after each other... the flow wont be able to deduct the vacation days and will therefore submit to manager the current days 2x... for example:
I have 20days of vacation available. I ask first for 20, and quickliy after again 20. Manager does not realize and approves. The flow will update the current vacation status with 0 (but will not restrict me for my second request....)
If i would wait 1 minute, between the requests, the powerapp form would tell me that i dont have the days available....
Any ideas whats the best solution?
Solved! Go to Solution.
Why do you deduct the days in the first flow? In my head the days should be deducted when the manager approves and only deduct if there is any days left. Doesn't matter how many requests the user sends - the manager can only approve if there are days left.
well this i thought first too, but then i realised that this way you could ask also multiple times for vacation and the approval request email which displays the manger how many days he has and how many he wants will display the values which would be wrong since the email is not updated if it stays for days in inbox... so you have to deduct it before. (users would start 2 requests, always asking all holiday, manager would see that it fits)
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!