(+351) 21 24 10006  ·  info@bconcepts.pt
Carnaxide, Lisbon

How to Filter a Gallery with Search in Power Apps

João Barros 05 de July de 2026 4 min read

A gallery with dozens or hundreds of records quickly becomes hard to scroll through by hand. A search bar solves it: the user types and the list filters in real time. The best part is that to filter a gallery with search in Power Apps you only need a text box and one Power Fx formula — no coding and no extra components. We will use an employee list as our example, but the same technique works for products, tasks or any other table.

Prerequisites

  • A Canvas app open in Power Apps Studio.
  • A connected data source — for example a SharePoint list, a Dataverse table or an in-app collection.
  • A Gallery already placed on the screen and bound to that data source.

Step 1: Confirm the gallery and the data source

Before you can search, you need a gallery showing data. A gallery is simply a container that repeats the same visual layout for each row of the source. Select the gallery and check the name of your source in the Items property. In this example we will use a table called Colaboradores with the columns Nome and Departamento. If the gallery already shows the full list, you are ready to continue.

Step 2: Add the search box

On the Insert tab, choose Text input and place the box above the gallery. To keep the formula readable, rename the control to txtPesquisa in the properties pane. Then set the HintText property to give the user a clue about what they can look for:

"Pesquisar colaborador..."

Step 3: Filter the gallery with the Search function

Here comes the main part. Select the gallery and change the Items property to the Search function, which takes the table, the text to look for and the columns to search in:

Search(
    Colaboradores,
    txtPesquisa.Text,
    "Nome",
    "Departamento"
)

The Search function is case-insensitive and looks for the text inside each listed column. A handy detail: when the box is empty, Search returns every record, so the gallery goes back to the full list on its own with no extra condition.

Step 4: Search across several columns with Filter

Search covers most cases, but sometimes you want more control — for example, combining the search with other criteria. In those cases we use the Filter function with the in operator, which checks whether the text appears inside each column:

Filter(
    Colaboradores,
    txtPesquisa.Text in Nome || txtPesquisa.Text in Departamento
)

The || operator means "or", so a record shows up if the text matches Nome or Departamento. This approach is more flexible because you can add more conditions with && ("and").

Step 5: Ensure delegation on large sources

On sources with many records, such as SharePoint lists, Search and the in operator may not be delegable: Power Apps only processes the first records (500 by default) instead of the whole list. The alternative that SharePoint can delegate is the StartsWith function, which finds records whose field starts with the typed text:

Filter(
    Colaboradores,
    StartsWith(Nome, txtPesquisa.Text)
)
Tip: if a blue warning triangle appears on the formula, that is the delegation warning. For large volumes, prefer StartsWith and avoid non-delegable functions.

Step 6: Add a button to clear the search

To let the user jump back to the full list quickly, add an icon or button and set the OnSelect property:

Reset(txtPesquisa)

The Reset function clears the text box. Because the gallery depends on txtPesquisa.Text, the full list reappears immediately.

Check the result

Enter preview mode (the F5 key or the play button) and start typing in the box. The gallery should narrow the results with every letter. Then delete the text or click the clear button and confirm that all records come back. If nothing changes, check that the name used in the formula (txtPesquisa) exactly matches the name of the text box.

Conclusion

With just a text box and one formula, you gave your gallery a fast, user-friendly search. The natural next step is to combine the search with a dropdown filter — for example, also filtering by department — by chaining conditions inside Filter. Which column would you add to your search next?