cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
newLinuxNoob
Regular Visitor

calculating non-conventional week-off

Hello,

 

I have created a flow that fetched information from SP list and calculates if an employee has missed logging hours on daily basis and sends out an email if someone misses to log. It works fine. Now I have an issue when it comes to calculating non-conventional week-offs, like if an employee has week-off on Tuesday and Wednesday. 

 

I have a couple of theories but not sure if they are reliable.

1. Calculate if an employee has worked/logged for 5 continuous days, including leaves/time-offs, and consider 6 and 7th day as week-off

2. Calculate number of hours worked in a week (lets say 40 hours/week). If the count reaches 40 hours then the next 2 days are week-offs.

3. Maybe combining both the logic?  

 

 

Need some help on calculating the same. Any suggestions/help is very much appreciated.

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @newLinuxNoob,

 

I have serval questions need to understand so that I can accurately judge the feasibility of your plan.

  1. How do you store daily basis information into the SharePoint list?
  2. Will it fresh every week?
  3. If an employee worked for a continuous 50 hours, will the additional 10 hours count into next week?

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.

View solution in original post

Hi @newLinuxNoob,

 

You can do this by creating two conditions to determine the employee whether satisfied the condition to have a vacation, that doesn't need to send emails to employees to remind them to go to work if they satisfy one of them.

  • When an employee does not come to work, check ahead to see if he has been working continuously for the past five days. If he has been at work for five consecutive days, there is no need to send a reminder.
  • If he has not worked continuously for the past five days, check his total working hours this week. If the total working time reaches 40, there is no need to send a reminder, otherwise send it.

 

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.

View solution in original post

3 REPLIES 3
v-litu-msft
Community Support
Community Support

Hi @newLinuxNoob,

 

I have serval questions need to understand so that I can accurately judge the feasibility of your plan.

  1. How do you store daily basis information into the SharePoint list?
  2. Will it fresh every week?
  3. If an employee worked for a continuous 50 hours, will the additional 10 hours count into next week?

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.

@v-litu-msft 

Thank you for looking into it. 

 

We store all the data as lists in Sharepoint and they are not refreshed, data gets appended whenever there is a new entry. 

 

I don't have any logic for carrying forward additional hours yet, because, for now, I am taking Sat and Sun as my only weekends to calculate other things.

Hi @newLinuxNoob,

 

You can do this by creating two conditions to determine the employee whether satisfied the condition to have a vacation, that doesn't need to send emails to employees to remind them to go to work if they satisfy one of them.

  • When an employee does not come to work, check ahead to see if he has been working continuously for the past five days. If he has been at work for five consecutive days, there is no need to send a reminder.
  • If he has not worked continuously for the past five days, check his total working hours this week. If the total working time reaches 40, there is no need to send a reminder, otherwise send it.

 

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.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,334)