cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Multiple Search

Hi

 

is it possible to search on multiple columns in powerapps. 

 

My requirement has 4 fields - Name, Country, City, ID. i need to be able to search with Account Name (mandatory) + one or more of other 3 fields.

 

It is not a single Search field (if I'm searching for 'red' it should not search within all columns in my datasource). I have 4 different search fields.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Multiple Search

Hi @shwetapathak,

 

Yes, that is possible.

We could take use of nested fitlers to make it.

Formula should be:

 

Search(
Filter(Table,
StartsWith(AccountName,TextInput1.Text)
),
TextInput2.Text,
"Country",
"City",
"ID"
)

Formula above would have Country, City and the ID searched within the TextInput 2. If you would like each of the fields have a Input Box, then the formula would be changed into:

Filter(
Filter(
Filter( Filter(Table, StartsWith(AccountName,TextInput1.Text) ), StartsWith(Country,TextInput2.Text)
),
Startswith(City, TextInput3.Text) ),
Startswith(ID, TextInput4.Text)
)

Formula reference:

Filter, Search, and Lookup functions in PowerApps

Regards,

Michael

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Helper V
Helper V

Re: Multiple Search

Hi shwetapathak, 

Did you see Michael's suggestion re multi column searches? here

Highlighted
Community Support
Community Support

Re: Multiple Search

Hi @shwetapathak,

 

Yes, that is possible.

We could take use of nested fitlers to make it.

Formula should be:

 

Search(
Filter(Table,
StartsWith(AccountName,TextInput1.Text)
),
TextInput2.Text,
"Country",
"City",
"ID"
)

Formula above would have Country, City and the ID searched within the TextInput 2. If you would like each of the fields have a Input Box, then the formula would be changed into:

Filter(
Filter(
Filter( Filter(Table, StartsWith(AccountName,TextInput1.Text) ), StartsWith(Country,TextInput2.Text)
),
Startswith(City, TextInput3.Text) ),
Startswith(ID, TextInput4.Text)
)

Formula reference:

Filter, Search, and Lookup functions in PowerApps

Regards,

Michael

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Search multiple columns with StartWith and single input box

To StartsWith and search multiple columns

Filter(Datasource, StartsWith( Column1, TextSearchBox.Text ) 

     || StartsWith( Column2, TextSearchBox.Text )   

  )

 

The trick lies in the || seperator

Highlighted
Frequent Visitor

Re: Multiple Search

Hi, 

 

This formula makes sense, but being very new to power apps I'm not sure where to plug this formula in. 

 

I've attached an image so you can help. 

 

Cheers 

 

 

Highlighted
Helper II
Helper II

Re: Multiple Search

@Pnolan 

 

You need to be clicked on your gallery and under "Items" is where you would want to place the code above.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (4,180)