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

Search in multiple columns with search box

I have a gallery connected to a SharePoint list. I have add a search box to this gallery. Currently the search box works but it only searches on the Title field. I also want to search in another column named Achternaam (Last name). The results will be soredt by achternaam, ascending. How do i edit the formula so it also searches the Achternaam column?

 

The formula i now use is: SortByColumns(Filter(CachedLunchlijst, StartsWith(Title, Zoeken.Text)),"Achternaam",Ascending)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: Search in multiple columns with search box

There was a similar question asked: https://powerusers.microsoft.com/t5/General-Discussion/Searching-on-multiple-fields-or-columns/td-p/...

 

In your instance, I would try: Sort(Search('CachedLunchlijst', Zoeken.Text, "Title", "Achternaam"), "Achternaam", Ascending)

 

The only downside to this solution that is it requires all the fields that you want to search to be in a text format previous to using the formula. If you try to convert it using .Value or Text(variable) or Value(text) or any other way in the formula, then errors will occur. Hope this helps.

View solution in original post

2 REPLIES 2
Highlighted
Continued Contributor
Continued Contributor

Re: Search in multiple columns with search box

@rschalker

You might try:

SortByColumns(
      Filter(
            CachedLunchlijst,

                  StartsWith(
                        Title, Zoeken.Text ||
                         Achternaam = Zoeken.Text)),
"Achternaam",Ascending)

Highlighted
Anonymous
Not applicable

Re: Search in multiple columns with search box

There was a similar question asked: https://powerusers.microsoft.com/t5/General-Discussion/Searching-on-multiple-fields-or-columns/td-p/...

 

In your instance, I would try: Sort(Search('CachedLunchlijst', Zoeken.Text, "Title", "Achternaam"), "Achternaam", Ascending)

 

The only downside to this solution that is it requires all the fields that you want to search to be in a text format previous to using the formula. If you try to convert it using .Value or Text(variable) or Value(text) or any other way in the formula, then errors will occur. Hope this helps.

View solution in original post

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 (6,727)