Hi All,
I am new to power automate & i need to run a flow every month which can perform the below action:
Scenario: There are two SharePoint List: one is Employee detail & other one is Leave Balance in the following format:
Leave Balance
| EmployeeEmail | Fiscal Year | Paid Leave Balance | Sick Leave Balance |
| a@xyz.com | 2021 | needs to be updated monthly | needs to be updated monthly |
| b@xyz.com | 2021 | needs to be updated monthly | needs to be updated monthly |
Employee Details
| EmpEmail | Joining Date | Expected Confirmation Date | Actual Confirmation Date |
| a@xyz.com | 01-01-2021 | 31-03-2021 (i.e. 3 months from joining) | 31-03-2021(i.e. 3 months from joining) |
| b@xyz.com | 01-05-2020 | 31-10-2020((i.e. 5 months from joining)) | 30-11-2020(i.e. 6 months from joining) |
Total annual leaves are 15 for Paid & 6 for SickLeave.
During the probation period leave balance will be 0. But once probation is completed then Paid Leave balance should be updated monthly as:
for 1 year of service
previous balance + 15/ (number of months in a year - total months taken for confirmation)
==> 15/(12-3) = 15/9 (when employee is getting confirmed in 3 months)
After completion of 1 year of service, paid leave should be updated monthly as
previous balance + 15/ 12
Similarly, Sick Leave balance should be updated as
for 1 year of service =
previous balance + 06/ (number of months in a year - total months taken for confirmation)
==> 06/(12-3) = 06/9 (when employee is getting confirmed in 3 months)
After completion of 1 year of service, Sick leave should be updated monthly as ==
previous balance + 6/ 12
Also, as paid leaves can be carry forward annually with the limit of 42 leaves so that needs to be taken care.
Could you please help? its urgently required.
Note: Fiscal Year is from April to March.