i have list forEmployee Vacation 21 days in year when employee leave request for vacation if number or days less than or equal 21 send approve
i make 3 column 1 = from date
2 = to date
3= calculated column to calculate number between two date
but flow cant see the number of days in calculated column in condition flow
i make variable to put calculated column in it and put output in condition
flow run when the 21 days finish flow give me 0 but when i make another request flow cant see the conditon and send approve and give me number -9 how can i solve this problem
Thanks for providing more detail at here.
Flow will consider calculated column as text, so if you want to compare a calculated column with certain number, you may need to convert it to a string.
If you want to send an approval request when the total vacation days are less than or equal to 21 days. Instead of using Get items, please check the following configuration for a reference.
First, create a list includes columns Date (date and time), Date2 (date and time), and Days (calculated column).
Trigger the flow by When an item is created or modified.
Add a Compose action with the following code to convert Days into a string:
Add a Condition to check if the Compose output is less than or equal to 21.
Under if yes branch, start an approval with details of leave request. Under if no branch, send an email to the requestor.
Please take a try with it and feel free post back if you need more help.
It seems that you have multiple actions of Update items.
As your flow is triggered by When an item is created or modified, so whenever an item is created or modified, the flow will be triggered. While the action Update item will update the list, which will result in an infinite trigger loop.
Please consider adding another Condition under the trigger to check if the triggered item matches certain condition.
I have made the following test for your reference:
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
Check out the community blog page where you can find valuable learning material from community and product team members!