web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Gallery by Look...
Power Apps
Answered

Filter Gallery by Lookup, Number, and Text Columns

(0) ShareShare
ReportReport
Posted on by 95

I have a gallery that I want to filter using a text box that searches multiple columns in a SharePoint list. The problem is that one column has numbers (ID), two columns have a lookup (FHANumber_x003a_FHA_x0020_Number and FHANumber_x003a_Property_x0020_N), and the rest of the columns are text (RequestType and RequestNumber). How can I do this? Below is a picture of what I have so far.  

k_cain_0-1611960323540.png

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @k_cain ,

    Can you please post that code in Text.

  • k_cain Profile Picture
    95 on at

    Warren, here's the code I've been using:

     

    SortByColumns(If(IsBlank('FHA Number or Property Name Search_Input'.Text),'Construction Analyst Workload Management',Filter('Construction Analyst Workload Management',Value('FHA Number or Property Name   Search_Input'.Text)=ID||'FHA Number or Property Name Search_Input'.Text=FHANumber_x003a_FHA_x0020_Number.Value||'FHA Number or Property Name Search_Input'.Text=FHANumber_x003a_Property_x0020_N.Value||StartsWith('FHA Number or Property Name Search_Input'.Text,RequestType||StartsWith('FHA Number or Property Name Search_Input'.Text,RequestNumber)),"ID",If(SortDescending1,Ascending,Descending))
  • Verified answer
    WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @k_cain ,

    The below is free-typed, so watch brackets and commas etc, but you should get an idea of the syntax if there are any errors.

    With(
     {
     wSearch:'FHA Number or Property Name Search_Input',
     wList:
     AddColumns(
     'Construction Analyst Workload Management',
     "FHANo",
     FHANumber_x003a_FHA_x0020_Number.Value,
     "FHAProp",
     FHANumber_x003a_Property_x0020_N.Value,
     wID,
     Text(ID)
     )
     },	 
     SortByColumns(
     Filter(
     wList,	 
     IsBlank(wSearch) || 
     (
     wSearch =wID ||
     wSearch=FHANo ||
     wSearch=FHAProp ||
     StartsWith(RequestType,wSearch ||
     StartsWith(RequestNumber,wSearch)
     )
     ),
     "ID",
     If(
     SortDescending1,
     Ascending,
     Descending
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • k_cain Profile Picture
    95 on at

    Warren, I keep getting errors. Any ideas?

    k_cain_0-1612194222808.png

     

  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    @k_cain ,

    That does not really help - what is the error? I was also assuming the values you posted were valid - have you checked them?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard