Hi all,
Apologies if this has been answered before, but I've been unsuccessful finding anything through searches. Happy to be redirected.
I'm looking for guidance in building a flow that automates a training plan for new employee hires. Essentially, 'John Smith' will have to complete 'Training x' 3 days after their hire date, 'Training y' 5 days after their hire date, and so on. I'm able to create an Planner Task action with due date = addDays(utcNow(), +5, 'yyyy-MM-ddT00:00:00EST') but I need to replace the 'utcNow()' with their dynamic starting/hire date (would want to enter this only once since it will likely be 15+ trainings over the course of a year).
Trigger - New Employee (name & hire date)
-not sure where/what software would be most effective place to log this info (read on another answer that MS Forms is good for this, but unfortunately my company doesn't have this enabled)
Actions - (multiple) Tasks in Planner (as above, 'Training x' based on hire date + 3 days)
Any help is appreciated, thank you!
Solved! Go to Solution.
Sure!
On your new Sharepoint list, you can add a date column to store hire date, lest call it 'HireDate'.
In your flow, use 'When an item is created' trigger
Then Planner 'Create task'
The maths to calculate ('Training x' based on hire date + 3 days) are simple:
Replace
due date = addDays(utcNow(), +5, 'yyyy-MM-ddT00:00:00EST')
and use
due date = addDays(triggerBody('HireDate'),3,'yyyy-MM-ddT00:00:00EST')
Not with my laptop, unable to test it yet
Hope it helps
Proud to be a Flownaut!
Hi!
The first problem to solve is the trigger.
Do your company have Sharepoint? If so, I would suggest to create a new item in a Sharepoint list and trigger 'When an item is created'
If not, you can use 'Manually trigger a flow' and add the data you need as inputs from Power Automate console
Please let us know if any of these two approaches fits your requirements to continue discussing further details
Thanx!
Proud to be a Flownaut!
We do use Sharepoint so that works.
Could you assist with how to get the correct training date based on hire date?
Sure!
On your new Sharepoint list, you can add a date column to store hire date, lest call it 'HireDate'.
In your flow, use 'When an item is created' trigger
Then Planner 'Create task'
The maths to calculate ('Training x' based on hire date + 3 days) are simple:
Replace
due date = addDays(utcNow(), +5, 'yyyy-MM-ddT00:00:00EST')
and use
due date = addDays(triggerBody('HireDate'),3,'yyyy-MM-ddT00:00:00EST')
Not with my laptop, unable to test it yet
Hope it helps
Proud to be a Flownaut!
@efialttes I don't suppose there's an easy way to automate avoiding weekends/holidays for the due date, is there? (Keeping it to business days only)
Thanks so much for your help!
Hi again!
First of all, did my initial suggestions worked? If so, that's great news!
I think there is a reasonable way to remove weekends... but please note I am about to have dinner with my kids, give me some time for the answer!
Proud to be a Flownaut!
Yes, your solution worked flawlessly!
No rush at all, enjoy dinner with your kids! Thanks again for being so helpful with my questions.
Hi!
Plase have a look to this thread. I think it is very similar to what you are looking for -at least to remove weekends-
https://powerusers.microsoft.com/t5/Building-Flows/Calculating-Business-days-using-flows/td-p/315402
Also remember, the best way to thank for the support, is by clicking 'Thumbs up' in any partial answer you found valuable, or even in all of them 😉
Hope this helps
Proud to be a Flownaut!
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
86 | |
58 | |
50 | |
42 | |
37 |
User | Count |
---|---|
91 | |
76 | |
74 | |
61 | |
42 |