Hello all,
I have a flow that is triggered by an email and results in a task being created in microsoft planner. The 'startdate' for the task is the same day that task is created (utc(Now)) and the 'duedate' is set for 2 days from the startdate. I pulled a formula elsewhere on the web that has successfully excluded weekends from the duedate calculation using a couple of initialize variable steps. I am now searching for a formula to use that will exclude holidays. My company observes 11 holidays in the US. I was wondering if I might be able to use the dayofyear expression to exclude those 11 holidays?
Here are some snips of the flow:
Thank you all for your help!
Brett
Solved! Go to Solution.
Hi @bgoldberger :
Do you want to get the date two days after the current date (and exclude weekends and weekdays).
Firstly,I am afraid that dayofyears cannot meet your requirements, because it is impossible to 100% determine the day of the year for a certain holiday.
Secondly,please try this flow:
Refrenence Expression:
1\
[
{
"Date": "2021-1-1"
},
{
"Date": "2021-1-18"
},
{
"Date": "2021-2-15"
},
{
"Date": "2021-5-31"
}
]
/*Need to list all holidays*/
2\
Hi @bgoldberger :
Do you want to get the date two days after the current date (and exclude weekends and weekdays).
Firstly,I am afraid that dayofyears cannot meet your requirements, because it is impossible to 100% determine the day of the year for a certain holiday.
Secondly,please try this flow:
Refrenence Expression:
1\
[
{
"Date": "2021-1-1"
},
{
"Date": "2021-1-18"
},
{
"Date": "2021-2-15"
},
{
"Date": "2021-5-31"
}
]
/*Need to list all holidays*/
2\
Hi @v-bofeng-msft ,
Wow, this is fantastic and thanks so much for your help. I can tell this will function just as I was hoping for. The output from the compose function should work for my due date in planner. But for whatever reason, the flow keeps timing out at the do until step. I've tried throwing in a couple of delays to see if that will work but it isn't getting pushed through. Maybe this is just temporary? Let me know if you might have any suggestions. Thank you!
Flow triggered by email:
Hi @bgoldberger :
There is a problem with the 'condition' action:
I have marked the error:
The correct setting is
Best Regards,
Bof
Hi @v-bofeng-msft ,
That was certainly it! I've been working on this the past week and this really helps. Thanks again and happy new year.
Brett
Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
User | Count |
---|---|
54 | |
42 | |
39 | |
35 | |
34 |
User | Count |
---|---|
72 | |
68 | |
58 | |
58 | |
50 |