Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 4bvrLtBPuSnH60mSM7rrVU
Power Automate - Building Flows
Answered

Using ODATA Filter Query

Like (1) ShareShare
ReportReport
Posted on 2 Aug 2024 15:00:13 by 49
Hi All! So a recent project came up where I currently need to use ODATA filter. I have gotten as far as getting the real column name but now am trying to figure out what the ODATA filter query should be. 
 
Currently I had created a string variable and have the value set as: 
 
addDays(utcNow(),-30, 'MM/dd/yyyy')
 
My ODATA filter query is:
 
maintenance_x0020_ends eq 'MaintenanceTermination' but that appears to be an incorrect formula. Any assistance on this would be greatly apprecoiated!
  • kddsling Profile Picture
    49 on 05 Aug 2024 at 03:45:04
    Using ODATA Filter Query
    David_MA is correct. I forgot to include the context for the formula. That was the formula I used as a value for a variable I created to use in the ODATA query. Both the suggestion on ISO8601 as well as the compose action were both what I needed.
  • Suggested answer
    David_MA Profile Picture
    10,858 Super User 2025 Season 1 on 02 Aug 2024 at 18:02:08
    Using ODATA Filter Query
    I am a bit confused as to why you are showing the expression for subtracting 30 days from the current date. How does that relate to your question and the query filter? If you are using the date in your filter query, dates need to be formatted as ISO8601 dates, which would be yyyy-MM-dd rather than MM/dd/yyyy.
     
    If you pasted that by mistake and you are only asking about the query filter, when you use eq, it must be an exact match. I would add a Compose action to your flow and put the maintenance ends value into it. Run the flow so you can see what is returned so you can compare it to the filter.
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 87

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 70 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard
Loading started