How to Use Power Automate Get Items Filter Query + 8 Examples

When dealing with a large amount of data in Power Automate, it is unable to fetch all the records from the SharePoint list. With the Power Automate get items filter query option, we can easily filter out the data based on our requirements.

In this article, I will explain how to use Power Automate get items filter query, Power Automate get items filter query contains, get items filter query choice column in Power Automate, including:

  • Power Automate SharePoint get items filter query multiple conditions
  • Get items filter query contains Power Automate
  • Power Automate get items filter query startswith
  • Power Automate get items filter query yes no column
  • Power Automate Get items filter query greater than equal
  • Power Automate get items filter query person field

Power Automate Get Items Filter Query

Power Automate “filter query” is a parameter that is available within the ‘Get items’ and ‘Get rows’ flow actions. It filters and retrieves data from SharePoint according to the given filter query conditions.

Operators used in Power Automate get items filter query:

The operators in the table below can be used in the Power Automate get items filter query syntax.

OperatorFor
eqequals
nenot equals
gtgreater than
gegreater than or equal to
ltless than
leless than or equal to

Power Automate Get Items Filter Query Choice Field

To get items from the filter query on the choice field in Power Automate, see the below example:

Example: I have a SharePoint list [Project Management Team] with a few list columns. I want to filter out the SharePoint list items with project statuses of Completed or Rejected.

Get items filter query choice column Power Automate

Check out the steps below:

1. Create a Power Automate Instant cloud flow.
2. Inside the Get items flow action, provide parameters such as Site Address, List Name, and Filter Query condition.

Where ‘eq’ means the ‘equals to’ operator in a Power Automate filter query syntax. (ProjectStatus: Internal name of a field).

Power Automate get items filter query choice field

2. Next, take a Create HTML table action and give the below properties:

  • From: Take body/value from the dynamic content of get items.
  • Columns: Select a custom table to create a table manually.
Power Automate SharePoint get items filter query choice column

3. To display the HTML table, take the send an email(V2) flow action. Fill in the details like To, Subject, and format the body of the email, as shown below image:

Power Automate filter query choice field

Save and run the flow manually.

See also  How to Create an Excel file from SharePoint list items using Power Automate?

Output:

The output will display the filtered SharePoint list items that have Project status as Rejected or Completed.

Power Automate filter query choice column

This is how to use Power Automate to get items filter query to filter out the data based on condition.

Power Automate Sharepoint Get items Filter Query Multiple Conditions

To get an items filter query in Power Automate based on multiple conditions, follow the example below:

Example:

I have taken a SharePoint list with a few different columns, as shown in the below image:

Power Automate filter query multiple conditions

Multiple Conditions: Now, I wanted to fetch the SharePoint list of items based on the condition like:

  • Project Deadline equals to Today’s date and
  • ProjectStatus is equal to ‘In progress’ and
  • Project Approver is equal to ‘Lidia Holloway’

Here are the steps below:

Click Showall to display all advanced parameters:

1. Select and add the Get Items flow action, and provide the Site Address, List Name, and Filter query condition.

ProjectDeadline eq '@{formatDateTime(utcNow(),'MM/dd/yyyy')}' and ProjectStatus eq 'Inprogress' and
( ProjectApprover/Title eq 'Lidia Holloway')
Power Automate SharePoint get items filter query multiple conditions

2. Then select Create an Html table action. Then, in the From field select the value of get items from the dynamic content.

  • Columns: Select custom column values from the drop-down.
Filter query get items multiple conditions Power Automate

3. To display all the items from an HTML table, take the Send an email(v2) action. Enter parameters like To, Subject, and Body.

Filter query in get items multiple conditions Power Automate

Output:

The output will display the fetched SharePoint list items based on the given multiple conditions.

Power Automate get items SharePoint filter query multiple conditions

This way, we can use the data filter query to retrieve the SharePoint list items based on multiple conditions.

Power Automate Get items Filter Query Contains

To get the SharePoint list of items that contain a particular substring from Power Automate, see the example below:

Note:

In the Power Automate Filter query, the expression contains() function is invalid. Instead, we can use the substringof() function to retrieve the list item that contains a particular substring.

So, now we will use the filter query substringof() in the Get items action.

Example:

I will use one of my SharePoint lists named ‘Task Details‘ with a column ‘Task Title’ as shown in the below figure:

Get items filter query contains Power Automate

In this list of items, I wanted to fetch the items whose Task Title contains a particular substring, ‘Project‘.

Follow the steps mentioned in the previous example:

1. Inside the Get items action, provide the Site Address, List Name, and Filter Query as below:

Power Automate filter query contains

2. Create an HTML table with all the details that need to be displayed.

3. Add Send an email(v2) to view the details from HTML table.

Save and run the flow.

Output:

The result will show the data or SharePoint list of items that contain a substring.

Filter query Power Automate contains

This way, you can use the get items filter query contains in Power Automate to retrieve the data.

See also  How to Run a Query against a Dataset Using Power Automate?

Get items filter query startswith Power Automate

To retrieve the SharePoint list items that start with a particular character or a substring, see the below example:

Example:

I have used one of the SharePoint list named ‘User Registration‘ with a couple of columns:

Get items filter query startswith Power Automate

My requirement is to get the SharePoint list items whose Usernames start with the character ‘J‘.

Follow the previous example steps to do this:

1. Add the Filter Query expression in the Get items action, and provide the site address and list name.

SharePoint get items filter query Power Automate

Output:

This is the result, which we can email by displaying all the SharePoint list items that match the condition.

Power Automate get items filter query starts with

Power Automate Get Items Filter Query Yes No Column

To filter out SharePoint list items based on Yes/No column values, see the below example:

In Power Automate, these boolean values can be represented as Yes – True and No – False. However, OData never uses either Yes/No or True/False to filter the data from a SharePoint list.

Example:

To do this, I have created a SharePoint list named ‘Hazard Checklist- Work Place‘ with ‘First aid Availability?’ as a Yes/No type column.

Power Automate get items filter query yes no column

Recently, I was assigned the task of filtering data from a SharePoint list to identify items related to a First Aid facility that was unavailable.

Follow the below instructions:

1. Under the trigger, add the ‘Get items‘ flow action under the trigger and provide the mentioned parameters.

IsProjectCompleted_x003f_ eq 0 

Note:

The below given syntax wont support in filter query condition.

ColumnName eq ‘Yes’
ColumnName eq ‘No’
ColumnName eq ‘true’
ColumnName eq ‘false’
Power Automate odata filter query yes no column

Save and run the flow.

2. If there are no errors, the flow runs successfully. The outputs of the display details of list items that satisfy the filter query condition are below.

Power Automate SharePoint get items filter query yes no column

This way, you can fetch the data from the SharePoint list based on the yes/no column using the Power Automate get items filter query.

Power Automate Get Items Filter Query Greater than or Equal

To retrieve the SharePoint list items based on the date column values, see the below placed example.

Example:

Here, I have a SharePoint list that has a column as Registration Date (Date Time column).

Condition:

Fetch SharePoint list items that have a Registration Date greater than or equal to Today.

Power Automate odata filter query greater than or equal

Follow the below instructions:

1. Create an ‘Instant cloud flow’ with a trigger.

2. After that, add the ‘Get items‘ flow action and set the below details:

  • Site address: Select a specific site address from the drop-down.
  • List Name: Select a specific list from the drop-down.
  • Filter Query: Provide the condition as placed below code:
ResignationDate eq'@{formatDateTime(utcNow(), 'yyyy-MM-dd')}'
Power Automate get items filter query greater than or equal

3. Then add Create HTML table and take a custom table to add values dynamically as shown below:

Power Automate get items filter query greater than or equal to Date

4. To display the HTML table, take the Send an email(v2) action and take the parameters like To, Subject, and Body.

Power Automate get items filter query Date

Once the flow has been created, Click on Save and Test.

See also  How to get selected value from gallery in Power Apps?

Output:

  • Check the email to view the output from the Power Automate filter query date as of today.
Power Automate SharePoint get items filter query

This is how to use a Power Automate filter query greater than or equal operator to retrieve data from the SharePoint list.

Power Automate Get Items Filter Query Person Field

To get the SharePoint list items from the person field equals, follow the example.

Example:

To implement it, I have taken a SharePoint list named ‘Vacation Tracking Sheet‘ with different datatypes as shown below:

In this SharePoint list, â€˜HR Manager’ is the People picker column.

From this SharePoint list, get all the SharePoint list items where an ‘HR Manager’ is equal to ‘Lidia Holloway’

Get items filter query person field Power Automate

Follow the below-given steps to build a flow:

1. Log in to Power Automate. Create a manual trigger flow. Add an Email Input inside the trigger.

2. In the next step, add a ‘Get items’ flow action to get all items from a SharePoint list. Set the below details:

  • Site address: Select a specific site from a drop-down.
  • List Name: Select a SharePoint list from a drop-down.
  • Filter Query: Provide OData filter query as placed in the code below.
HRManager/EMail eq '@{triggerOutputs()?['body/Author/Email']}'

In the EMail, E&M should be uppercase. Where [eq] represents equals to in the Power Automate Odata filter query syntax.

Person Field can also be filtered with attribute like : Requester/Title eq 'Lidia Holloway'
Filter query Power Automate date

3. Under the ‘Get items’ flow action, add the Create HTML table and provide the following

  • From: Take value from Get items of dynamic content.
  • Value: Select a custom table from the drop-down.
HeaderValue
Employee ID
Leave Date
Return Date
HR Manager Display name
Select values from the get items of dynamic content
Get items filter query person column Power Automate

4. Now, the flow is ready. Click the Save &Test button ->Test the flow Manually. In the Run flow window, provide an email address.

Filter query Person field in get items Power Automate

5. Output

You can see the output consists of email addresses filtered items from a SharePoint list person field.

Filter query Power Automate person field

This is how to filter out the SharePoint list items based on the person column with the get item filter query in Power Automate.

Some more articles you may also like:

Conclusion

I hope this tutorial has given you an idea of how to use Power Automate to get items filter query in Power Automate. I have explained the “Power Automate get items filter query” with the example:

  • Get items filter query contains
  • Get items filter query choice column
  • Power Automate get items filter query person field
  • Filter Query get items Date Power Automate
>