How can you make search in PowerApps? Filter vs Lookup

Işkın Uçar
2 min readOct 19, 2023

--

In this article, we will examine how to search using PowerApps’ two powerful functions, Filter and LookUp, which one is more functional in which situations, and their main differences.

The main purpose of both functions is to search for records in the tables in our PowerApps application. Of course, with minor differences :)

Filter Function Usage:

The filter function allows all records matching the formula in the table to be retrieved. Its most basic use is to use it as a formula in the Items property of the tool we want to list (gallery, data table, etc.).

Filter(Table;Formula 1;Formula 2)

LookUp Function Usage:

The LookUp function finds the first record in the table that matches the formula. Its most basic use is to use it as a formula in the Items property of the tool we want to list (gallery, data table, etc.).

LookUp(Table*, Formula [, *ReductionFormula* ] )

To understand better, let’s move on to our example.

First of all, I prepared a simple Excel table that we can use as a data source. Our table includes some districts of Istanbul and the area codes of these districts.

Table1

I connected the table I created to a Datatable object within the Power Apps application.

To test the Filter function, use the Items property of the relevant Datatable.

I edited it as Filter(Table1;DistrictCode=“212”)

Result; All records with field code 212 in Table1 were displayed in Datatable.

To test the Lookup functionality, I used the Items feature of the relevant Data Table.

I edited this as LookUp(Table1;DistrictCode = “216”)

Result: The first record in Table1 with DistrictCode 216 was displayed in Datatable.

In this way, while you list all the records in the table with the Filter function, you can search for a more specific record with the LookUp function.

--

--