cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
thewoodsytiger
Level: Powered On

Dynamic date in Flows

Hello,

 

I am trying to create a flow that sends an email on a reccurence that allows for a particular date to be dipslayed in that email.

 

Currently I have it set up to send that email on Wed, Thurs. FRI every other week. The FRIDAY date is one that im interested in displaing for that particular week.

 

For example, I would like the email from outlook to read

"Don't forget to APPROVE your timecard if you have completed your work week or immediately after your last shift on %FRIDAY DATE%" Where that last field is a variable part of the message, that one week will read "Friday, March 22," but the next time willl read "Friday, April 5" (As it is a two week occurance) or something along those lines.

 

Any insight into how to create content like this? Thanks!

7 REPLIES 7
Super User
Super User

Re: Dynamic date in Flows

@thewoodsytiger :

Can you post a screen shot of your Flow?  That will make it easier to assist.

The proposed solution will likely invlove the use of the dayOfWeek() expression.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
thewoodsytiger
Level: Powered On

Re: Dynamic date in Flows

Scott,

 

The Highlighted are is what Im looking to make a dynamic date. I was just using the scratch builder, but am happy to comb through the code or add more complex expressions to make the message more personable to connect with my staff...

 

Thanks!

InkedFlow_LI.jpg

abm
Level 10

Re: Dynamic date in Flows

Hi @thewoodsytiger ,

 

Please use the below format expressions.

 

formatDateTime(addDays(utcNow(),14),'dddd')
formatDateTime(addDays(utcNow(),14),'MMMM')
dayOfMonth(addDays(utcNow(),14))

 

Thanks

thewoodsytiger
Level: Powered On

Re: Dynamic date in Flows

Thats not what Im looking to do. For example:

 

Timecards are due every other Friday, Lets say they were due this week (MARCH 22 is friday), I would want to send emails on Wed, Thur, and Fri of THIS WEEK saying "please approve by Friday, March 22." on all 3 emails that get sent.

 

I can get use a similar formula to what you posted to add days on Wed and Thur on individual flows, and for Friday I can just use on a third flow

 

@{formatDateTime(utcNow(), 'dddd')}, @{formatDateTime(utcNow(), 'MMMM')}, @{dayOfMonth(utcNow())}
 

what I wanted to see is if there is a way to compile 3 different flows (One for wed, thur and fri) into one single flow. Maybe using some kind of if/then identified to identify if dayOfWeek=3/4/5 to determine which expression to use? Im very new to flows so any help is appreciated.

abm
Level 10

Re: Dynamic date in Flows

Hi @thewoodsytiger ,

 

Thanks for your reply. I need to try this and get back to you.

 

 

thewoodsytiger
Level: Powered On

Re: Dynamic date in Flows

@abmthank you, I appreciate your help! Let me know if you see anything that may work.

abm
Level 10

Re: Dynamic date in Flows

Hi @thewoodsytiger ,

 

Sorry been busy. Did you managed to find a solution for this?

 

I was thinking in a different direction. 

 

First generate all the dates in an excel sheet. Example generate for next 5 years or so.

 

Place the excel sheet in a common location where flow can read the excel sheet. (eg: Onedrive, server folder location, etc)

 

Next in flow first step action to find todays date. Read the excel sheet and check the date is in excel sheet first row. If there is a match then send email and delete the row from excel. 

 

Next again read the next line of the excel sheet. If it's end of row (in this example after 5 years) then send another email to notify the admin to generate next set of dates.

 

Thanks

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 195 members 4,653 guests
Please welcome our newest community members: