cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Does anyone have a solution to leave counting in shifts?

Hello,

 

I’ve been scratching my head about how to display leave requests to my team. In the UK we have an allocation that we want to make sure our team members don’t exceed. 

What I’d like to do is create a means to display to each team member the amount of leave they have requested or scheduled. 

I’ve tried to use the shifts connector to access requests but there are some limitations. For example, if I create a request through the “requests function” it will trigger my flow that starts “when a request is created”. However, if you manually add time off in the shifts calendar it doesn’t trigger. Not everyone likes to use the app to request holiday - not everyone is on board to doing it this way yet. So there are times when you have to manually add leave. 

any help or guidance/steering on this would be much appreciated. I’d like to retain using shifts where possible because it integrates nicely with planning for our team members. 

thanks!

Craig

2 REPLIES 2
Super User II
Super User II

The When a Time Off request is created, updated or deleted trigger should trigger on any time off creation or update through Shifts. If they don't want to use Shifts, you may be able to build a secondary flow or a parallel branch of your flow that triggers based upon the calendar itself. 

If you could provide an expanded screenshot of your Flow and steps, your Flow run history, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE. Want to know more? Follow @BradGroux on Twitter, and check out my Medium blog at https://msft.engineer.

Helper II
Helper II

Hi Brad,

 

Thanks for your reply; thank you for suggesting that the trigger should power regardless of whether it’s through the app or manual created in the teams calendar. However, it’s not doing that which I guess is why I’m scratching my head. The only time it seems to work is if you make a request through the app and then confirm it. Manually creating one in the planner table/calendar doesn’t get actioned by the trigger in flow. 

My flow currently tries to watch for created requests and then ultimately write the different types of leave I have to a SharePoint list as this is the only way I figure I can create a “hr dashboard” with leave. 

anyway, my flow looks like:

 

1) triggered by creation 

F2D40668-0B4E-4897-A6F0-674A2C4844F9.jpeg

2) I’ve got some variables but then have conditioned by created

 

BD50DA08-949F-4DD9-8F18-EDF005B2D35F.jpeg

3) if it’s created then i try to query the time off request 

78385E13-4217-4254-962F-A340ADD7F63E.jpeg

4) I then use get user to get the ID of the user and the manager who accepted the request 

 

91B804B1-494F-41C4-9978-5122A00F3A26.jpeg

53DD32F7-8CA2-452D-A021-0901C8BCFE57.jpeg


5) I then set the variable initialised at the beginning to get the user and then manager and interchange with their display name 

 

775F61F4-49AF-4915-A45F-A4D94B0ED6FB.jpeg

5) I then condition that by the time off request ID to filter by the different leave display names

 

B5B90A0F-8FEF-47C2-AC35-7AD392B1F49D.jpeg

If it’s correct it then passes to a compose which replaces the TOR ID with a text string, in this case “holiday”


6) it then writes to a SharePoint list the fields I want;

 

A1CB9612-3F47-4AF2-81BF-7921B65B306E.jpeg

and finally to an outlook group calendar. 

The main difference I guess that I’m experiencing is that when I create the leave request for say somebody else using shifts, nothing is triggered. 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (67,162)