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

Filter items with query on today error

Trying to get this flow up and running.

I need it to return the items where 'creation date' equals today.

This is my setup.

Sharepoint list with creation date (UTC +1)

date.PNG

 

My filter query is this

flow.PNG

When testing it, I get this error (means: expression not valid...)

Any help?error.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

I made it work with a little work around:

 

Knipsel.PNG

made a query between today and today +1 with the ge and lt

seems to do the trick.

View solution in original post

7 REPLIES 7
v-yamao-msft
Community Support
Community Support

Hi @maximvanneste,

 

The Created of a SharePoint list item is returned as ‘yyyy-MM-ddTHH:mm:ssZ’, so in the filter query function, you should format the utcnow likes below:

utcnow('yyyy-MM-ddTHH:mm:ssZ')

 

In the Filter query field, please surround the function with a single quote.

 

Please check the following screenshot:

1.PNG

 

Please have a try with it on your side and feel free reply if you need more help.

 

 

Best regards,

Mabel Mao

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

@v-yamao-msft

 

Thank you for your answer, the flow seems to work without returnin an error, however when I add a new item it says that the body value is [].
I need it to return all the items from today, could it be that the language plays a roll in the filterquery? 

Knipsel.PNG

 

Kind regards,
Maxim

Hi @maximvanneste,

 

Created is a default column in SharePoint list, so I am afraid that it is not possible to format it in a Odata filter function.

 

If you want to return all the items on today, please add a custom Date and time (Date only) column in the list, then format the utcnow as “yyyy-MM-dd”.

 

The function could be configured as following:

CustomCreatedDate eq ‘utcnow(‘yyyy-MM-dd’)’

 

Please have a try with it on your side.

 

 

Best regards,

Mabel Mao

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

Hi @v-yamao-msft

 

 

I created a custom column named 'Datum' and went ahead and changed the flow to this:

Knipsel.PNG

When running it I see that the column 'Datum' is '2018-07-17' which is identical to what it should be, still gives me an error?

I feel stupid for not finding this error as I'm prety sure this is easy.

error.PNG

 

Kind regards,
Maxim

 

I made it work with a little work around:

 

Knipsel.PNG

made a query between today and today +1 with the ge and lt

seems to do the trick.

View solution in original post

Anonymous
Not applicable

I have this same issue. I've spent hours trying all sorts of methods and I can't get it to work. Either it tells me there is no value (which, there is, because I have a fake one with today's date) or it says the flow ran with no issues, but I don't have an email.

 

I have a list of items and I want to send an email whenever the "sendreminder" field equals TODAY. Any help would be much appreciated!!!

 

Workflow OverviewWorkflow Overview"Successfully" ran, but I didn't get an email"Successfully" ran, but I didn't get an emailJust proof that the field is titled "sendreminder"Just proof that the field is titled "sendreminder"

I think you forgot the ' after utcNow

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,409)