top of page

How to use a filter in PowerApps Collection

The PowerApps Filter function is a formula that allows you to retrieve a subset of records from a larger dataset based on a specific condition. It takes two arguments: the data source and the logical expression that defines the condition for filtering. The DataSource argument specifies the data source from which you want to retrieve the records, and the LogicalExpression argument specifies the condition for filtering the records. In this article, we will discuss how to use a filter in PowerApps Collection.


In simple words, the PowerApps Filter function is used to find out the specific records in a table that satisfies a formula.


Syntax

Filter( Table, Formula1 [, Formula2, ... ] )
  • Where,

  • Filter = Function Name

  • Table = Particular Table to search

  • Formula(s) = It specifies the formula of a specific record of the table. If you apply more than one formula, the results of all formulas are combined with the And function.

Example

There are some records in the PowerApps. From these records, we will filter some specific data that belongs to India. If you don't have a record in your PowerApps, you can create it.


After adding the record in PowerApps, follow the below steps to filter those records according to your requirement. You can filter according to their Names, Addresses, IDs or Contact/Mobile Numbers.


STEP 1: Go to Insert => Vertical Gallery in Power apps.




STEP 2: Select a Data Source (CandidateInfo) in your app.


STEP 3: Select the Gallery and apply the below Filter formula:

Items = Filter(CandidateInfo, Address="India")

Where,

  • Filter = Function Name

  • CandidateInfo = Collection Name

  • Address = Field Name

  • Bangalore = Filter Value

Not only Address, but you can also filter any field like Name, Id, Mobile Number etc.


In the above Gallery Screen, You can see all records (Addresses) that belong to India.


Same way if you want to filter a record that belongs to Sofia, then apply the below filter formula:

Items = Filter(CandidateInfo, Name="Sofia")

In the above Gallery Screen, You can see all records (Name) that belong to Sofia.


Conclusion

Filtering a record in a PowerApps collection enables users to narrow down the results and find the exact data they need quickly. It enhances the overall user experience and saves time by eliminating the need to search through large datasets manually. With the Filter() function, users can easily filter records based on various criteria such as date, status, or customer name. Overall, PowerApps collection's filtering capabilities provide a powerful and versatile tool for managing data within an app.

bottom of page