Search , Filter and Lookup in power apps

Loading

Search function:- We can use the Power Apps search function to find records from a table that contains a string value in any of the columns. The search string can be presented anywhere in the columns.

Power Apps search function returns the same columns which are presented in the table from where you searching. it will return one or more records based on the formula.

The table should contain columns which are having a Text or String value. Apart from a Text value, it will not take any other column value like Number, Choice, Picture, Hyperlink, etc.

search function, all that it does is it takes that specific search term and checks the given columns in this table if there’s a match

syntax:- 

Search( Table, Search String, Column1 [, Column2, ... ] )

Lets search a title column item in a data table by using search. first we need to connect power apps studio with share point data source.

Here i am connecting a data table to the data source to display the records & searching for a record by using title column as shown below

After assigning a formula to the data table i am running the app then the result will be shown as below when i searched an item in title column.

Here i have searched for an item with the title “1” where it shows all the items with starting with 1

  • search function is independent of upper or lower cases.
  • filter and search return an empty table if no record found.
  • lookup returns blank if no record found.

Filter function :- 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 to discard those that don’t..

It returns one or more records based on formula.

Syntax :-

Filter(Table*, Formula1 [, *Formula2*, … ] )

To see how the filter function works, let’s go back to how the search function works first.The search function basically takes a table, a search string, and the columns where you want to search.A filter function does the same thing and turns it up to a next level.Filter takes a table where it will conduct a search, and also takes formulas that evaluate each record within that table.

The filter function, it takes a conditional logic and checks it against each row in the table. If it finds a record that meets the conditions given, it returns that record.One of the best ways to use the filter function is by setting conditions where it’s possible to have several matches across the data source.

Here i have connected an share point list Electronics as data source and performed the filter action on data table. as shown below.

After running the app the result will be shown as below. where i have filtered for “Samsung” in the Brand column.

Lookup function :- The Look Up function finds the first record in a table that satisfies a formula. Use Look Up to find a single record that matches one or more criteria.

Syntax :- Look Up(Table*, Formula [, *Reduction Formula* ] )

Lets perform a look up function on a connected data source “share point” list “Electronics”

Look Up(Electronics, TextInput1.Text in Brand.Value) .here i have performed a look up function on “Brand” column where i have got 1st record only

We can perform search , filter and look up on Gallery control also.

One thought on “Search , Filter and Lookup in power apps

Leave a Reply

Your email address will not be published. Required fields are marked *