Filter a search list in an app
In this scenario article, you'll learn how to filter a search list in a canvas app.
Prerequisites
- You must have created an app using a SharePoint connector that connects to a list created using Microsoft Lists.
- The list should consist of several list items to filter data inside the canvas app.
Scenario details
You can use text input control in a canvas app to input text and filter the list such as a data table to filter list items from the connected list.
To search using text input and to filter the records, you have to use the function filter. For example, Filter([@Colors], StartsWith(Title, TextInput1.Text))
uses the list connection Colors and the column Title to filter the records.
Example
Sign in to Power Apps.
Create a new app, or edit an existing app.
Note
Ensure the app uses SharePoint connection and connects to a list as described in the prerequisites.
Select + (insert) from the left pane.
Select Text input.
Likewise, insert a Data table.
Update the Items property of the data table with the following formula:
Filter([@Colors], StartsWith(Title, TextInput1.Text))
Replace Colors with the name of your list, Title with the name of the column in the list, and TextInput1 with your text input control name.
Play the app.
Enter text, such as 'B,' to filter items starting with 'B'.
See also
- Formula reference for Power Apps
- Control reference for Power Apps