Power Automate Get Items Filter Query Multiple Conditions

Do you want to filter the SharePoint list items based on multiple conditions in Power Automate? Then, read this complete tutorial. Here, I will explain examples of Power Automate SharePoint get items filter query multiple conditions.

To get items from a SharePoint list based on multiple filter conditions, use the Power Automate ‘Get items’ filter query option inside a flow. Example: ProductDeliveredDate le ‘@{utcNow()}’ and ProductAvailablity eq ‘Available’ and (TotalQuantity ge ‘900’ or ProductPrice le ‘6000’).

Power Automate ‘Get items’ flow action Filter Query Operators:

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

Now, let us see how to use multiple conditions in the Power Automate Get items filter query. Here, I will explain an example of a Power Automate Odata filter query with multiple conditions.

To execute Power Automate get items filter query multiple values in a flow, follow the step-by-step process as pointed out below.

  1. Create an “Automated cloud flow” in Power Automate.
  2. Add a “Get items” flow action in a flow.
  3. Create an HTML table.
  4. Save and Test the Power Automate Flow.
  5. Output of the Flow.

Example:-1

In this example, I will explain the Odata filter query multiple conditions in Power Automate by referencing the SharePoint list.

This is the SharePoint list, which I will connect to the Power Automate flow, with a few columns like Task Title, Task Assigned to, and Task Status. According to the requirement, we wanted to fetch the SharePoint list items with ‘Task Status’ as ‘In Progress’ or ‘Not Completed.’

So, we can use the Get items flow actions with multiple filter conditions in Power Automate.

Power Automate Get Items Filter Query Multiple Conditions

So, let us create a Power Automate flow that will trigger automatically.

1. Browse make.powerautomate.com to open the Power Automate Home page; click + Create -> Select ‘Automated cloud flow’ -> Give the Flow name, choose the trigger, and click the Create button. In the trigger, select Address Site and List Name.

Power Automate Odata filter query multiple conditions

2. After that, add a “Get items” flow action under the trigger, which retrieves all the SharePoint list items that give information on all the columns and their values. Add the filter query value in Power Automate’s ‘Get items.’

(TaskStatus eq 'In Progress') or (TaskStatus eq 'Not Completed')
Get items filter query multiple conditions in Power Automate

3. Add a ‘Create HTML table‘ flow action to see the SharePoint list items retrieved based on the Odata filter query syntax. Set the properties of the table as shown below:

HeaderValue
Task Title
Task Status
Click on Dynamic Content -> Select values under dynamic content.
Power Automate SharePoint get items filter query multiple conditions

4. When the flow is ready to run, make sure to Save it. Then, Test the flow Manually. Create a new item in the SharePoint list to see how the flow works.

5. If there are no errors in a flow, it will display as ‘Your flow ran successfully.’ Open the HTML table to see the SharePoint list items with ‘Trip Status‘ as ‘In Progress‘ or ‘Not Completed.’

Power Automate get items filter query multiple values

Let us see another example.

Power Automate SharePoint get items filter query multiple conditions

I will discuss another example on Power Automate SharePoint get items filter query multiple conditions. You can have a look at it.

To do that, I have taken a SharePoint list, ‘Products List,’ with different columns, as seen in the image below. As per the client’s requirement, we wanted to filter out the SharePoint list items based on the multiple conditions.

Multiple Conditions:

  • Product Delivered Date – less than or equal to the current date (and)
  • Product Availability – equals to Available (and)
  • Product Total Quantity – Greater than or equal to ‘900’ (or)
  • Product Price – less than or equal to ‘6000’
power automate get items filter query multiple conditions

Similarly, follow the steps mentioned above to create a flow. But changes are required in the steps like:

1. In the ‘Get items’ flow action, provide the Site Address, List Name, and Filter Query.

I have used multiple conditions in the Power Automate Get items Filter Query, as in the code below.

ProductDeliveredDate le '@{utcNow()}' and ProductAvailablity eq 'Available' and (TotalQuantity ge '900' or ProductPrice le '6000')

In the Power Automate get items filter query syntax, include the ‘Internal Names’ of a SharePoint list column.

Filter Query Multiple Condition for SharePoint get items action in Power Automate

2. Similarly, to display the filtered SharePoint list items, add a ‘Create an HTML table’ with a custom column and take values from the dynamic content.

Power Automate filter query on Multiple conditions

3. The ‘HTML’ table outputs will show all the SharePoint list items that satisfy the multiple conditions given in Power Automate’s ‘Get items’ flow action filter query.

Power Automate Get Items Filter Query Multiple Conditions

This is how to use the Odata filter query multiple conditions inside a Power Automate flow.

Conclusion

In this Power Automate tutorial, I have explained how to use multiple filter conditions in Power Automate Get items. I have shown two examples related to “Power Automate sharepoint get items filter query multiple conditions“.

You may also like: