Power Automate – SharePoint Get Filtered Items
With this article I want to explain how we can get items with Power Automate (From SharePoint Online) and Filter them.
- SharePoint list’s called “Offices” ,with some data:
- Excel file where we save filtered items. I create and Excel file with same column of list, and store it in OneDrive. Keep mind, you must format sheet as a Table if you want to use it in Power Automate to add rows.
- Power Automate flow who get data and put it into Excel File. I used “Get Items” connector to retrieve data from SharePoint list.
We can get data with no query. In this case, you mus put only “Site Adress” and “List Name Parameters”…keep mind “Top Count” parameter and it returs “All” items. I do not suggest this approach (And also Power Automate, who show you a Warning 🙂 )
Best approach, is write a Filter Query to retrieve only items you need. Basically you should write a formula like this: fieldname operation value.
- As fieldName you must use iternal field name of SharePoint (Write me a comment if you need a post on this argoument).
- Operation available are:
- eq (Equal to)
- lt (Less Than)
- gt (Greater Than)
- ge (Greater than or Equal to)
- le (Less than or Equal to)
- ne (No Equal to)
- Value: value to find, date and string must be inside ‘
We can use also logical operator like “and” and “or”
Let’s see some example (I show query and result on Excel sheet):
Filter Query with Functions
You can also use functions for your filter query.
The syntax is: functions(fieldName, value)
I hope it help you