cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Add days and check if it's today

Hello guys
I have a big problem and I don't know how to solve it.
I have a date field in a sharepoint list, through flow I need to add 3 days to that date and check if the result matches today.

Date + 3 days = today -> send email

how can I do?

 

Thank you!

 

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @Vale_2290 ,

 

What type of Check field? If its type is a single line of text, please apply @fchopo ’s recommendations to adapt your Flow.

It should be noted that we need to add a single quote outside the expression.

Like:

135.PNG

If its type is Choice, I am afraid that this filed cannot be configured in Filter Query.

You need to use Condition or Filter array to filter items.

And you need to use Check value as a filter.

Like:

137.PNG

Please take a try and feel free to let us know if you have any other questions.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Super User
Super User

@Vale_2290 there are probably more elegant ways of doing it, but I like the Compose control so have used that a few times as follows. The SharePoint list has a date column:
0-SP-List.png

 For date comparisons we need to make sure the format is in  yyyy-MM-dd format for everything:

1a-Flow.png

The email result has added 3 days to the ReminderSent column and if it matches today has sent the email. I didn't bother to re-format the date back to my date format but you could do that if you needed to.

2-Result.png

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

Super User III
Super User III

Hello @Vale_2290

You could use the expression adddays()

Example:
addDays(utcNow(),3, 'yyyy-MM-dd')

Than do a IF statement to check if the the above expression is equal to <SharePoint Date>

If yes:
Send email
If no: do nothing

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others




Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




 
 
I need to insert another condition: the email must start only if the "Check" field which is of the chosen type is empty
Super User II
Super User II

Hello @Vale_2290 

Recently I faced a similar problem and solved it in the following way:

 2020-03-11 16_30_36-Window.png

 

In the Get Items action you could filter the query with the formula: 

ReminderSent eq ''@{addDays(utcNow('yyyy-MM-dd'),3)} and Check eq @{null}

so you onlye get those items whose ReminderSent is 3 days from today and check field is null. After that, we build a table with the selected fields (title and date) and send it by email.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

 

Hi @Vale_2290 ,

 

What type of Check field? If its type is a single line of text, please apply @fchopo ’s recommendations to adapt your Flow.

It should be noted that we need to add a single quote outside the expression.

Like:

135.PNG

If its type is Choice, I am afraid that this filed cannot be configured in Filter Query.

You need to use Condition or Filter array to filter items.

And you need to use Check value as a filter.

Like:

137.PNG

Please take a try and feel free to let us know if you have any other questions.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

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 (52,924)