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 / Cascading Galleries Fi...
Power Apps
Answered

Cascading Galleries Filter and Search

(0) ShareShare
ReportReport
Posted on by 48

Hoping someone can help me. 

 

I have a gallery (gallery2) set to a SharePoint list distict choice column. 

Based on the selected value I have it filtering another gallery. 

I also have a textbox search, searching both galleries.

 

I can get the search to work well or I can get the filter to work well, but I'm struggling to get both to work well. 

 

Here is where the search is working well, but the filter by selected is not working:

If(Gallery2.Selected.Value,Filter('Service Catalog_1',Category.Value = Gallery2.Selected.Value),Search('Service Catalog_1',TextBox4.Value,"field_4","Title","field_6"))

 

Here is where the filtering is working well, but the search is being a bit odd: 

If(Gallery2.Selected.Value="All",'Service Catalog',Search(Filter('Service Catalog',Category.Value = Gallery2.Selected.Value),TextBox4.Value,"field_4","Title","field_6"))

 

What am I missing? 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @SChavez ,

     

    The second formula is correct. 

    'but the search is being a bit odd'

    Could you share details?

     

    Best Regards,

    Wearsky

  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Here's a suggestion on how you can structure your formulas to make both filter and search work together:

    If(
     Gallery2.Selected.Value = "All",
     Search('Service Catalog', TextBox4.Value, "field_4", "Title", "field_6"),
     Filter(
     Search('Service Catalog', TextBox4.Value, "field_4", "Title", "field_6"),
     Category.Value = Gallery2.Selected.Value
     )
    )


    Mark as solution if this solves your issue. Feel free to reply to this conversation if you need anything else. Make sure to give it a thumbs up.

  • SarahC Profile Picture
    48 on at

    @ShaheerAhmad I tried this and it seems to work. However, regardless of which field I list first it gives a deligation warning and I think that is impacting the way it's searching on those fields. 

    Any suggestion to work around the delegation?

  • Verified answer
    SarahC Profile Picture
    48 on at

    I put the sharepoint list into a collection and somewhat following the example from ShaheerAhmad with a few adjustments. This seemed to have corrected delegation issues and solved what I needed. 

     

     

    If(Gallery2.Selected.Value="All",c_catalog,Search(If(!IsBlank(TextBox4.Value),c_catalog,Filter(c_catalog,Category.Value=Gallery2.Selected.Value)),TextBox4.Value,"Title","field_4"))

     

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard