cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
efialtes
Level 8

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.

Eco_Graham
Level: Powered On

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.".'.

efialtes
Level 8

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

 

 

efialtes
Level 8

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.

 

Eco_Graham
Level: Powered On

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

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,369)