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 days).
-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!!