Power Automate OData filter query in SharePoint Get Item
Power Automate OData filter query in SharePoint Get Item
In Power Automate, the OData filter query helps to retrieve only the data that matches specific criteria. Below is an example of how to write it in a flow.
Example 1: Filtering SharePoint list items where Status is Approved
Let’s assume you have a SharePoint list with a column called Status and you want to filter items where the Status is Approved.
Filter Query:
Status eq 'Approved'
Status
: The internal name of the SharePoint column.eq
: OData operator for "equals."'Approved'
: The value you are filtering by.
Example 2: Filtering records based on dates and another field
Suppose you want to filter records where Status is Approved and the Created date is after 2023-01-01.
Filter Query:
Status eq 'Approved' and Created gt '2023-01-01T00:00:00Z'
and
: Logical operator to combine multiple conditions.gt
: OData operator for "greater than."'2023-01-01T00:00:00Z'
: Date in the ISO format (YYYY-MM-DDTHH:MM).
Steps to Write an OData Filter Query in Power Automate:
Add your data source action (e.g., "Get Items" for SharePoint).
In the "Filter Query" field, write the OData query.
Example query for filtering items based on a column value:
ColumnName eq 'Value'
Replace
ColumnName
with the name of your column andValue
with the actual value you want to filter by.Operators you can use in OData:
eq
: Equalsne
: Not equalgt
: Greater thanlt
: Less thange
: Greater than or equal tole
: Less than or equal to
✨ Thanks for reading! ✨
I hope you found this blog on the Microsoft Power Platform helpful! From Power Apps, Power Automate (Cloud & Desktop), Canvas Apps, Model-driven Apps, Power BI, Power Pages, SharePoint, Dynamics 365 (D365), Azure, and more, I cover a wide range of topics to help you harness these powerful tools. Don’t miss out on future tips, tutorials, and insights—hit that subscribe button to get the latest posts right to your inbox. 💌
💬 I’d love to hear your thoughts! Drop a comment below with your questions, ideas, or feedback—let’s get the conversation started!
🔗 Let’s connect and grow together!
Follow me, Ravindra Jadhav, on your favorite platforms for even more content and updates on Microsoft Power Platform and related technologies:
- 💼 LinkedIn – Let’s network and share ideas!
- 💻 GitHub – Explore my projects and code.
- 🐦 Twitter – Stay updated with quick tips and industry news.
- 📺 YouTube – Watch tutorials and deep dives on Power Platform, Power Apps, Power Automate, and more!
Let’s build something amazing together with Power Platform and Azure! 🚀
Comments
Post a Comment