cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Brice235i
Level 8

ODATA Filter on Get Items - Return items created today (for a specific timezone)

Hello, I need some help with an ODATA filter query on a Get Items action.

In laymen's terms: Created = TODAY and Booking Type = New and Credit is not equal to Yes

Here is my ill perceived attempt.

Created eq utcNow('dd-MM-yyyy') and Booking_x0020_Type eq 'New'and Credit ne 'Yes'

Capture.PNG

Anyone know where I've gone wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Brice235i
Level 8

Re: ODATA Filter on Get Items

Hello, thank you, but no, that didn't work.  My colleague came up with the answer by using a separate filter array action.

value is from GetItems and the expressions left to right are:

formatDateTime(item()?['Created'], 'yyyy-MM-dd')

formatDateTime(utcNow(), 'yyyy-MM-dd')

Capture.PNG

View solution in original post

5 REPLIES 5
Super User
Super User

Re: ODATA Filter on Get Items

Hi @Brice235i 

 

What's the error you getting?

 

In your filter query there is no space after eq 'New'

 

Created eq utcNow('dd-MM-yyyy') and Booking_x0020_Type eq 'New'and Credit ne 'Yes'



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Brice235i
Level 8

Re: ODATA Filter on Get Items

Still doesn't work unfortunately.  Doesn't like the date 

{
"status": 400,
"message": "String was not recognized as a valid DateTime. Creating query failed.\r\nclientRequestId: 17ee83df-5a4b-410f-b7e2-74ba62fbd906\r\nserviceRequestId: 17ee83df-5a4b-410f-b7e2-74ba62fbd906"
}
Super User
Super User

Re: ODATA Filter on Get Items

Thanks for our reply.

 

Try utcNow('yyyy-MM-dd')



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Brice235i
Level 8

Re: ODATA Filter on Get Items

Hello, thank you, but no, that didn't work.  My colleague came up with the answer by using a separate filter array action.

value is from GetItems and the expressions left to right are:

formatDateTime(item()?['Created'], 'yyyy-MM-dd')

formatDateTime(utcNow(), 'yyyy-MM-dd')

Capture.PNG

View solution in original post

Brice235i
Level 8

Re: ODATA Filter on Get Items

Actually,  I ditched the filter array and got the odata filter working:

 

Capture.PNG

 

the expressions are: 

concat(body('UTCnow_to_AWST_for_Filter_Calc'), 'T00:00:00')
concat(addDays(body('UTCnow_to_AWST_for_Filter_Calc'), 1, 'yyyy-MM-dd'), 'T00:00:00')

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,050)