Breyta

Deila með


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

  1. Sign in to Power Apps.

  2. 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.

  3. Select + (insert) from the left pane.

  4. Select Text input.

    Insert text input.

  5. Likewise, insert a Data table.

    Insert data table.

  6. 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.

    Filter formula.

  7. Play the app.

  8. Enter text, such as 'B,' to filter items starting with 'B'.

    Colors with filtered for 'B'.

See also