cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rschalker
Level: Powered On

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
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
tianaranjo
Level 8

Re: Search in multiple columns with search box

@rschalker

You might try:

SortByColumns(
      Filter(
            CachedLunchlijst,

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

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,303)