cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Brice235i
Skilled Sharer
Skilled Sharer

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
Skilled Sharer
Skilled Sharer

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
abm
Super User III
Super User III

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!

Learn more from my blogPower Automate Video Tutorials
Brice235i
Skilled Sharer
Skilled Sharer

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"
}
abm
Super User III
Super User III

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!

Learn more from my blogPower Automate Video Tutorials
Brice235i
Skilled Sharer
Skilled Sharer

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

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
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

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (105,525)