cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Re: SharePoint List: How to evaluate if a date has expired

I'm sorry, I cannot make it work 😞

 

According to this answer I received this very morning

https://powerusers.microsoft.com/t5/Flow-Forum/Can-we-use-WDL-expressions-i-e-utcnow-adddays-etc-in-...

I guess the format you need should be

 

@greater('coalesce(triggerBody()?['Fecha'],"2000-12-12")', 'adddays(utcnow(),-7,"yyyy-MM-dd")')

 

However, when saving the test flow, an error message is displayed. AS I mentioned in previous replies, I managed to make coalesce work inside a condition in May-June timeframe, since then some format changes have applied.

Let's hope a member of Microsoft Flow support team can help us to clarify if we can keep on using coalesce in Condition blocks or it has been discontinued.

Highlighted
Frequent Visitor

Re: SharePoint List: How to evaluate if a date has expired

I created a new list with a column for client names and a date column named Fecha. I even tried changing the region to US but on saving I get the following error:

 

The template validation failed: 'The template action 'Condition' at line '1' and column '1102' is not valid: "The template language expression 'greater(coalesce(triggerBody()?['Fecha'],"2000-12-12"), 'adddays (utcnow(),-7,"yyyy-MM-dd")')' is not valid: the string character '"' at position '41' is not expected.".'.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: SharePoint List: How to evaluate if a date has expired

@Eco_Graham

There seems to be a bug when comparing today's date with one stored in sharepoint, please note there are some threads discussing this topic like:

https://powerusers.microsoft.com/t5/Flow-Forum/Today-date-same-as-sharepoint-item-date/m-p/3411/high...

 

On my successful tests in May-June timeframe the "filter array" functionality was not available. Yesterday, I tested it with "condition" since the trigger executed in my flow is "when a sharepoint item is added"

 

Hope this helps

 

 

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: SharePoint List: How to evaluate if a date has expired

I think I found the proper format. I should have used double quotes for the trigger parameter, since it is inside an expression:

 

coalesce.png

 

Whith this format, when saving the flow, there are no parse errors.

 

Highlighted
Frequent Visitor

Re: SharePoint List: How to evaluate if a date has expired

I tried your solution but still get an error. I will leave it for now and try setting up a recurring task, Outlook calendar or 2013 workflow.

 

Many thanks for all your help.

 

Regards,

Graham

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (6,130)