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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,261)