I have a flow that post to teams a weekly-digest.
But i have a problem.... when someone have added an event that starts on Monday and ends on Thursday (for example).
Then i only get the start date and end daye, the day in between i dont get.....
My post to team looks like this:
[DAY] : [EVENT-TITLE]
The flow works great but i cant figure out how to get that day in between start and end date of an event that spans over several days.
Example:
If i have an event that starts on Monday. The event title is "EVENT123"
The event ends at Thursday.
Current flow would post this:
Monday: Event123
Then it ends. But i want this:
Monday: Event123
Thuseday: Event123
Wednsday: Event123
Thursday: Event123
But since an event only have an idicator on when it starts and when it ends i cant figure out how to make this work.
I also need the flow to work with events that happens on a single day.
Hi @Oskarkuus,
You can use the dayOfYear function to get the day number from start of year to timestamp, get the start date and end date, then use sub() function to get the diff between them.
dayOfYear(triggerBody()?['Start'])
dayOfYear(triggerBody()?['End'])
sub(variables('EndTime'),variables('StartTime'))
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.
Dont get it. How would this solve the issue to make a post where i get a printout for each day something happens....
event is monday to friday
i only have start and end date as indicators to play with.
but i want an indicator so i get a post for not just the start-date or end-date
monday - eventname
tuseday - eventname
wednsday - eventname.
and so on....
So, building off of Lin-Tu's Flow steps -- once you get the number of days between you can initialize a "Counter" variable and then use a Do Until to add the events with addDays(Counter) then increment the variable. Kind of like below.
Hey Oskarkuus,
Wanting to see if your Flow is working now or if you need more help.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
34 | |
16 | |
15 | |
9 | |
9 |
User | Count |
---|---|
36 | |
26 | |
17 | |
7 | |
7 |