Hello everyone !
I have 2 lists in SharePoint:
-Leave Request: Contain 3 columns (Title, StartDate, EndDate).
-Employee Leave Request Dashboard: Contain 4 columns (Title,EmployeeName,Amount of Annual Leave, Balance of Annual).
I want to create one flow for both lists:
1. For Leave request:
-When the item is created in SharePoint.
-I want to add conditons to check first if the employee request a vacation more than 3 days to send an approval to Manager and HR.
-If the leave request of the employee is less than 3 days i want to send only the email for the HR without sending to Manager.
2. For Employee Leave Request Dashboard:
(Note: Total of Annual Leaves is 15 days by default).
-Suppose i am the manager or HR and i want to approve the leave request for this employee that he request a vacation for 3 days. If someone of them approved the Leave request i want to update the Balance of Annual column to show the total for remaining days for his vacation.
-I should subtract the balance of annual (-) the amount of annual. (So If he requested 3 days and the leave request is approved the column will be (15-3) = 12).
-If its rejected the balance will remain the same. (15 days).
So any suggestion how to build this flow and what are the expressions i have to use to calculate the dates ? (I am using the dates based on the calendar)(SAME YEAR).
Thank you!!
Solved! Go to Solution.
Hi @Julien2,
1. There is no date dif function in Flow, so, the only way to compare two dates whether having three days dif, you can use the addDays() function, to add start date 3 days, then compare it whether great than end date, if it is, the vacation is not more than 3days.
2. If you want to caculate two dates to get the leave days, as a workaround, you can use the dayOfYear() function, to get two dates dif, for example:
And the date is a vacation, so it may need to add one day after getting the dif.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Julien2,
1. There is no date dif function in Flow, so, the only way to compare two dates whether having three days dif, you can use the addDays() function, to add start date 3 days, then compare it whether great than end date, if it is, the vacation is not more than 3days.
2. If you want to caculate two dates to get the leave days, as a workaround, you can use the dayOfYear() function, to get two dates dif, for example:
And the date is a vacation, so it may need to add one day after getting the dif.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Julien2,
Has your problem been solved?
If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!
Best Regards,
Community Support Team _ Lin Tu
Sorry for late reply. Yes it's solved thank you!
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!
User | Count |
---|---|
41 | |
40 | |
37 | |
34 | |
30 |
User | Count |
---|---|
52 | |
39 | |
36 | |
33 | |
24 |