cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

Search and filter a gallery on SharePoint multi Lookup column AND Text column

I've tried a million variations on this yesterday and today -- some way more complex.  I can get individual pieces working but never everything together.  So, I've simplified this for the sake of asking this question. 

I want to be able to search on multiple fields -- some fields are text fields which work fine.  However, other fields are multiple choice  fields that are sourced from a lookup field in a SharePoint list. 

 

I've used the below formula to create a label to show the items selected from the lookup which are noted above the gold bar.   

Left(Concat(ThisItem.ERG,Value & ", "),Len(Concat(ThisItem.ERG,Value & ", "))-2)

 

The items just above the gold bar are from the multiple choice field that I want to include in my search but are not currently a part of my formula. 

 

My search formula is shown in the image and is also noted here.  

If(IsBlank(txtInpSearch.Text), colResources,Filter(colResources,txtInpSearch.Text in Concatenate(Title, " ", Description," ")))

 

Can anyone tell me how to include all these fields in a filter, search combination?  

 

Thanks so much! 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Search and filter a gallery on SharePoint multi Lookup column AND Text column

Hi @CindyZ ,

Do you want to add the multiple Choice filed filter in your existing Filter formula?

How do you want to filter against your Multiple Choice field? Based on the Text Search Box or a Dropdown box?

 

If you want to add the multiple Choice field filter in your existing Filter formula, please consider try the following formula:

Filter(
       colResources,
       If(
          IsBlank(txtInpSearch.Text),
          true,
          txtInpSearch.Text in Concatenate(Title, " ", Description," ") || txtInpSearch.Text in Concat(ERG, Value & ", ")
       )
)

 

If you want to filter your Multiple Choice field based on a selected Dropdown value (I assume the default value in the Dropdown box is '- Select -'), please try the following formula:

Filter(
       colResources,
       If(
          IsBlank(txtInpSearch.Text),
          true,
          txtInpSearch.Text in Concatenate(Title, " ", Description," ")
       ),
       If(
          Dropdown1.Selected.Value = "- Select -",
          true,
          Dropdown1.Selected.Value in Concat(ERG, Value & ", ")
       )
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

3 REPLIES 3
Highlighted
Super User
Super User

Re: Search and filter a gallery on SharePoint multi Lookup column AND Text column

Hi @CindyZ 

It looks like you are working with a collection, hence, the colprefix so

 

If(IsBlank(txtInpSearch.Text), 
    colResources,
       Search(
              colResources,txtInpSearch.Text, "Title","Description"
        )
)

 

you can use use the Search() function to match text in any field you select in the collection. 

Highlighted
Community Support
Community Support

Re: Search and filter a gallery on SharePoint multi Lookup column AND Text column

Hi @CindyZ ,

Do you want to add the multiple Choice filed filter in your existing Filter formula?

How do you want to filter against your Multiple Choice field? Based on the Text Search Box or a Dropdown box?

 

If you want to add the multiple Choice field filter in your existing Filter formula, please consider try the following formula:

Filter(
       colResources,
       If(
          IsBlank(txtInpSearch.Text),
          true,
          txtInpSearch.Text in Concatenate(Title, " ", Description," ") || txtInpSearch.Text in Concat(ERG, Value & ", ")
       )
)

 

If you want to filter your Multiple Choice field based on a selected Dropdown value (I assume the default value in the Dropdown box is '- Select -'), please try the following formula:

Filter(
       colResources,
       If(
          IsBlank(txtInpSearch.Text),
          true,
          txtInpSearch.Text in Concatenate(Title, " ", Description," ")
       ),
       If(
          Dropdown1.Selected.Value = "- Select -",
          true,
          Dropdown1.Selected.Value in Concat(ERG, Value & ", ")
       )
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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
Post Patron
Post Patron

Re: Search and filter a gallery on SharePoint multi Lookup column AND Text column

Thanks so much!  Worked perfectly!  

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,268)