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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Searching across multi...
Power Apps
Unanswered

Searching across multiple tabs

(0) ShareShare
ReportReport
Posted on by 16

Hello,

 

I have set up a very simple 'classified ads' style Powerapp. Using the existing 'Asset Checkout' canvas app as a base.

 

Basically, I have a search box and when I search something it is only showing me results for the selected tab. In the attached screenshot for example, my search would only return items in the 'For sale' tab because that is what is currently selected.

 

Is there any way to search across all three of the tabs (for sale, for free, wanted) in a single search?

 

I would be very grateful for any help on this!

 

Thanks,

 

Jonny

 

Categories:
I have the same question (0)
  • RezaDorrani Profile Picture
    12,143 on at

    Hi @jonny_anything 

     

    Remve the CategoryID part of the filter

     

    Remove Categoryid = CategoriesGallery.Selected.CategoryId

     

    So Filter part of forumla becomes

    Filter(Products,SearchBoxText.Text in ProductName)

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • jonny_anything Profile Picture
    16 on at

    Hi @RezaDorrani 

     

    Thank you for the prompt reply - much appreciated!

     

    I made that change, the issue I have is that all of my items now appear in the 'For sale', 'For free' and 'Wanted' tabs (when they are selected) before I hit search I search i.e. they are no longer categorised.

     

    The 'For Sale', 'For Free' and 'Wanted' titles are clickable so I'd like them to just show the products in those categories when clicked and the search results to show any relevant products from all 3 tabs. If that makes sense?

     

    Thanks,

     

    Jonny

  • v-xida-msft Profile Picture
    on at

    Hi @jonny_anything ,

    Could you please share a bit more about your scenario?

    Do you want to search your Gallery items across all three of tabs (categories) before pressing the category tab in your app?

     

    I have made a test on my side, please take a try with the following workaround:5.JPG

     

    4.JPG

    Please set the OnSelect property of the Group1 under the CategoriesGallery to following:

    UpdateContext({SelectedCategory: ThisItem.CategoryName, search_reset:true})

    Set the Items property of the ProductsGallery to following:

    SortByColumns(
    Filter(
    AddColumns(ProductsCol, "CategoryName", LookUp(Categories, CategoryId=ProductsCol[@CategoryId], CategoryName)),
    SearchBoxText.Text in ProductName,
    If(!IsBlank(SelectedCategory), CategoryName = CategoriesGallery.Selected.CategoryName, true)
    ),
    If(category = "Reviews", "Comments", "Available"),
    If(category = "Reviews", Descending, Ascending)
    )

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

     

    Best regards,

  • jonny_anything Profile Picture
    16 on at

    Hello,

     

    Thank you for your reply.

     

    "Do you want to search your Gallery items across all three of tabs (categories) before pressing the category tab in your app?"

     

    That is correct yes, I want to be able to search across all 3 categories but if i select one of the tabs i only see the products that are in that category.

     

    I tried to implement your solution, the OnSelect worked fine, however I am getting some errors for the ProductGallery - do you have any ideas why that might be?

     

    Thank you,

     

    Jonny 

     

     

     

  • v-xida-msft Profile Picture
    on at

    Hi @jonny_anything ,

    Could you please share a bit more about the ProductsCol data source in your app? Is it a Excel table or a Collection?

     

    Based on the error message screenshot that you mentioned, I think there is something wrong with the ProductsCol data source.

     

    Please make sure that there is already a ProductsCol table data source added within your app. 

     

    I have made a test on my side, and don't have the issue that you mentioned. Please make sure you have specified proper table data source within your Filter formula. If the data source you used in your app called 'Products', please modify your formula as below:

    Set the Items property of the ProductsGallery to following:

    SortByColumns(
    Filter(
    AddColumns(Products, "CategoryName", LookUp(Categories, CategoryId=ProductsCol[@CategoryId], CategoryName)),
    SearchBoxText.Text in ProductName,
    If(!IsBlank(SelectedCategory), CategoryName = CategoriesGallery.Selected.CategoryName, true)
    ),
    If(category = "Reviews", "Comments", "Available"),
    If(category = "Reviews", Descending, Ascending)
    )

     

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

     

    Best regards,

  • jonny_anything Profile Picture
    16 on at

    Hello,

     

    Thanks for the reply. 

     

    I have updated 'ProductsCol' to be 'Products' and amended the items propery of the ProductsGallery. The error is no longer showing, which is great. I am still not able to search between multiple tabs though - the search bar is still only searching the selected tab.

     

    To give you some more information about the app. It is set up to submit to an Excel table stored on OneDrive. Please see some screengrabs attached showing the Excel. Do you have any idea what I am doing wrong?

     

    Thanks,

     

    Jonny

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard