How to use Filter & Search functions from SharePoint List in Power Apps?

Description

The Filter function finds records in a table that satisfy a formula. Use Filter to find a set of records that match one or more criteria and discard those records that don’t.

The Search function finds records in a table that contain a string in one of their columns. The string might occur anywhere within the column; for example, searching for “rob” or “bert” would find a match in a column that contains “Robert”. Searching is case-insensitive. Unlike Filter, the Search function uses a single string to match instead of a formula.

Filter and Search return a table that contains the same columns as the original table and the records that match the criteria. LookUp returns only the first record found, after applying a formula to reduce the record to a single value. If no records are found, Filter and Search return an empty table.

You can expand your search to include the Company column and the Name column:

Formula

Filter(Customers, StartsWith(Name, SearchInput.Text) || StartsWith(Company, SearchInput.Text) )

– Filters the Customers data source for records in which either the Name column or the Company column starts with the search string (for example, co). The || operator is true if either StartsWith function is true. Filter customers start with.

Formula

Filter(Customers, SearchInput.Text in Name || SearchInput. Text in Company)

– Filters the Customers data source for records in which either the Name column or the Company column contains the search string (for example, co) anywhere within it.