Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Searching in multiple columns when already filtering based on selection on other gallery.

Posted on 29 Nov 2024 06:23:17 by
Hi,
 
I'm working in the asset checkout template, and want the search to search in more than one column. The gallery is filtering on the selection from another gallery and what's in the search box, but is only searching in one column (ProductName). I would also like it to search in 'ModelNo'. Here's my code, please help!
 
SortByColumns(Filter(Products, And(CategoryId = CategoriesGallery.Selected.CategoryId,SearchBoxText.Text in ProductName
        )
    ),
    If(
        category = "Reviews",
        "Comments",
        "Available"
    ),
    If(
        category = "Reviews",
        SortOrder.Descending,
        SortOrder.Ascending
    )
)
Categories:
  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 143,202 on 01 Dec 2024 at 03:03:44
    Searching in multiple columns when already filtering based on selection on other gallery.
    Probably something like this
    SortByColumns(
       Filter(
          Products, 
          And
    ​​​​​​​ ( CategoryId = CategoriesGallery.Selected.CategoryId, ( SearchBoxText.Text in ProductName Or SearchBoxText.Text in ModelNo ) ) ), If( category = "Reviews", "Comments", "Available" ), If( category = "Reviews", SortOrder.Descending, SortOrder.Ascending ) )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,202

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,877

Leaderboard