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
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

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