title | description | author | ms.topic | ms.custom | ms.reviewer | ms.date | ms.subservice | ms.author | search.audienceType | contributors | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Filter a search list in an app |
This article explains how to search for items and filter the list in your app when sourcing data from a list created using Microsoft Lists. |
emcoope-msft |
conceptual |
canvas |
mkaur |
09/01/2020 |
canvas-maker |
emcoope |
|
|
In this scenario article, you'll learn how to filter a search list in a canvas app.
- 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.
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.
-
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'.
- Formula reference for Power Apps
- Control reference for Power Apps
[!INCLUDEfooter-include]