You are currently viewing OData filter query Power Automate in SharePoint get items
Odata filter query

OData filter query Power Automate in SharePoint get items

In this blog post, we will learn how to use OData filter query Power Automate with SharePoint.

OData filter query Power Automate and SharePoint list

How SharePoint get items action uses filter query in Power Automate

The “Get items” action is used to retrieve items from a SharePoint list. You can specify a filter query to limit the results to specific items based on certain criteria using the OData query options to filter and retrieve specific items from the data source.

Here’s how to use OData filter queries in the “Get items” action:

  1. Add the Get items action and specify the Site address and the list name.
  2. In the Advanced Parameter select Filter Query where you can specify your OData filter query to filter the items you want to retrieve.
  3. Write Your OData Filter Query in the provided textbox after you select the Filter Query.

Filter query on the classic design

OData filter query Power Automate

Filter query in the modern design

OData filter query Power Automate in SharePoint get items

Power Automate OData filter query Examples

The Power Automate filter query is written in OData. You can use logical operators and functions to build complex filter expressions such as.

StringColumn operator ComparedDAta

The operator can be

  • eq for equals
  • ne for not equals
  • gt for greater than
  • lt for less than
  • ge for greater than or equal to
  • le for less than or equal to
  • startswith() [column value begins with…]
  • substringof() [column value contains…]
  • contains
  • not contains
  • and
  • or

Get items filter query Examples

In the following examples we will learn :

  • How to add filter query in power automate?
  • How to add multiple filter query in power automate ?
  • and condition in filter query power automate.
  • or condition in filter query power automate.
  • filter query power automate blank.
  • filter query power automate by date ,…….etc

In all examples we will use the system name to use in the filter query , You should open list settings for the SharePoint list and select the column the end of the URL you will see a Field= That is what you need to use in your query

power automate odata filter query eq

Use:

You can use the “eq” operator to filter for items where a particular field or column is equal to a specified value.

Syntax:

<Column Name> eq ‘<Value>’

Example:

In this example we will filter the items that has title equal Annual Travel

Title eq 'Annual Travel'
filter12 | Power Platform Geeks

power automate odata filter query person field

Filtering based on a “Person” or “User” field in an OData filter query in Power Automate is different from filtering on standard fields and it will depend on the DataSource.

Syntax: PersonColumn/PropertyYouNeed

Example: Filter the person field by Email: to filter the person field by email you can write the OData filter .. CoulmnName/EMail operator then the email.

Requester/EMail eq 'heba@melqassas.onmicrosoft.com'

If you are using dynamc content as I have for the email to match …. remember to use single quotes ‘ your dynamic property ‘ around the dynamic content

filter query Power Automate

power automate odata filter query not equal

Use :

In Power Automate, you can use the “ne” (not equal) operator in an OData filter query to filter data where a field does not equal a specified value.

Syntax:

<Column Name> ne ‘<Value>’

Example:

Filter for items where the “Auto_ApprovalCEOLimit” column is not equal to 5000.

Auto_ApprovalCEOLimit ne 5000

Power Automate OData filter query greater than or equal

Use:

You can use the “ge” (greater than or equal) operator in an OData filter query to filter data based on values that are greater than or equal to a specified value.

Syntax:

<Column Name> ge <Value>

Example:

Filter for items where the “Quantity” column is greater than or equal to 1000

Quantity ge 1000

This will return the rows of data that has quantity greater than or equal 1000.

Example:

Power Automate OData filter query not equal null.

 DMApprovalReason ne null

This will return the data where DMApprovalReason not null

power automate sharepoint odata filter query choice field

Let’s assume you have a choice field named “Status ” in your SharePoint list.

Here’s an example OData filter query for retrieving items where the choice field is equal to Approved by CFO

Status eq 'Approved by CFO'

Power Automate OData filter query startswith

Use:

The “startswith” operator in an OData filter query is used to filter records based on whether a specified property starts with a given value.

Example:

startswith(Title, 'Annual')

This will retrieve items where the title starts with Annual.

Power Automate OData filter query contains

If you want to retrieve items where the “Title” property contains the substring “Annual,” the OData filter query would be:

contains(Title, 'Annual')

Power Automate OData filter query substringof

Note : Put the field name as the second parameter in substringof() function.

See Also
Join us
Need Help
  • Have a related question? Please ask it at deBUG.to Community.

Heba Kamal

Microsoft MVP, MCT, Technical Speaker, Blogger, and Microsoft 365 and Power Platform Consultant.

This Post Has 2 Comments

  1. tempry email

    I genuinely admire the way you write blogs. I bookmarked it and will return to it. Excellent post. Right now, I’m learning something difficult and completely new from websites with excellent articles or reviews.

  2. Puravive customer reviews

    Wow wonderful blog layout How long have you been blogging for you make blogging look easy The overall look of your site is great as well as the content

Comments are closed.