Hi, I'm attempting to build a flow on a sharepoint list to send an automated email when an item has gone past it's due date however I am facing this error.
The expression "Due Date lt '2021-15-42'" is not valid. Creating query failed.
clientRequestId: 1799b375-1c42-4019-b462-d8fd6987e4d0
serviceRequestId: 1799b375-1c42-4019-b462-d8fd6987e4d0
Wondering if anyone could help me out with this? Thank you
I inputted your recommendation and have successfully managed to get the flow working!
Thanks a lot for all your help 🙂
Hi @JamaalMoosa,
Just to double check. Are you still getting the expression error (Creating query failed).
Or do you mean that the flow is not sending an email for the items which are passed their due date?
Btw, initially I thought you were comparing it with a fixed date. But if you want to see if the due date has passed this expression is probably a bit easier for the filter query
DueDate lt '@{utcNow()}'
Hi @Expiscornovus I have attached a picture below of the site name
I did attempt the flow again also using the alternative site name but neither worked. Attached below is a picture of my input. Any ideas? Sorry to be a pain!
Hi @JamaalMoosa,
Can you check what the internal name of the field is? It might be DueDate instead of Due Date. Typically SharePoint removes spaces on creation.
So the expression also might be the below instead:
DueDate lt '@{formatDateTime('2021-12-30')}'
Also make sure you switch to the advanced mode when pasting the filter query.
Hi @Expiscornovus thank you for your response! 🙂 my due date is in the form mm/dd/yyyy picture also attached.
I tried inputting the expression you suggested but faced this error this time:
Action 'Get_items' failed
The expression "Due Date lt '2021-12-30T00:00:00.0000000'" is not valid. Creating query failed.
clientRequestId: efda1e1e-1ccf-4fca-b846-c7181ef6336d
serviceRequestId: efda1e1e-1ccf-4fca-b846-c7181ef6336d
Any ideas?
Hi @JamaalMoosa,
Just to double check, your due date field in the SharePoint list is column of datetime type, correct?
If so, you are comparing a datetime field with a string value.
When you are using this in a filter query of a Get Items action I would use the following expression instead:
Due Date lt '@{formatDateTime('2021-12-30')}'
Btw, I have change your date value too, because that is invalid 😉
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional