Thank you for visiting my site!

Home / PowerApps - Forms / How to search a List

How to search a List

Search

Create an new app empty, add a gallery connected to alist, add a textbox that we will use for searching.

—————————————————-

Change the Gallery Items to
Search([@’Zebra-Employee-Detail’],SearchBox.Text,”Title”,”Department”)
search the list columns Tile or department

—————————————————-

Add a Dropdown to show search results:
Distinct(‘Zebra-Employee-Detail’,Department)


for items properties use:
ShowColumns(Search([@’Zebra-Employee-Detail’],SearchBox.Text,”Title”), “Title”)

for gallery
Search([@’Zebra-Employee-Detail’],Dropdown2.Selected.Department,”Department”)
Filter(‘Zebra-Employee-Detail’, Department = Dropdown2.Selected.Result)


Filter

Change the Gallery Items to:
Filter(‘Zebra-Employee-Detail’,SearchBox.Text in Title) //Filter(Data Source,Condition) works on short list

Filter(‘Zebra-Employee-Detail’,StartsWith(Title, SearchBox.Text)) //Filter(Data Source,Condition)
add one more condition, it works like And
Filter(‘Zebra-Employee-Detail’,StartsWith(Title, SearchBox.Text),FavoriteColor = “Red”)

Filter(‘Zebra-Employee-Detail’,Department = Dropdown2.Selected.Department)

 

 

————————————————————–

Lookup

Returns the first record:

LookUp( IceCream, Flavor = “Chocolate”, Quantity )

LookUp(‘Zebra-Employee-Detail’, StartsWith(Title, SearchBox.Text)) //Filter(Data Source,Condition)


Search with a dropdown:

Set the dropdown items to:
Distinct(‘Zebra-Employee-Detail’,Department)

set the Gallery Items to:
Filter(‘Zebra-Employee-Detail’, Department = Dropdown2.Selected.Result)

Sum up Filtered column

Sum(Filter(‘datasource’, col.Value = “some text”), ‘col to add up’)

—————————

 

ADD YOUR COMMENT