cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
smorley
Post Patron
Post Patron

OData filter query on GetItems giving invalid expression error

Hi everyone,

I know there are lots of people with similar questions, but I can't seem to make any of the solutions work.

 

I have a very simple workflow that is a recurring one that gets new items in a list every morning.  It works fine, but now I want to put an odata filter in it, where the start date is greater than or equal to utcnow().

 

I get an invalid expression.  Can someone point me in the right direction please?

getitems odata filter.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you. 🙂

Only the utcNow() part is an expression. The rest just type in the Filter Query field.

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

5 REPLIES 5
tom_riha
Super User
Super User

Hello @smorley ,

the Filter Query has always the same format

ColumnInternalName <operator> 'value'

Everything is typed in in the Filter Query field as you have it on the screenshot, the only part where you can use expression is the value part.

Start_x0020_Time ge 'utcNow()'

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Hi @tom_riha I really love your blog

 

My other part of the error is no dynamic content available.  So when I type in Start_x0020_Time that's when I get the invalid expression error.

 

 

nodynamiccontent.jpg

Thank you. 🙂

Only the utcNow() part is an expression. The rest just type in the Filter Query field.

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
smorley
Post Patron
Post Patron

@tom_riha the error I get now is below. Is that because I need to format the Start time field?

 

smorley_0-1645194857254.png

 

smorley
Post Patron
Post Patron

Nevermind - I forgot the quotes around UTCnow().  Thanks @tom_riha 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,107)