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 / Combining Filters and ...
Power Apps
Answered

Combining Filters and Buttons

(0) ShareShare
ReportReport
Posted on by 245

Hi, and thank you for your expertise!

 

I have a filter that works, that includes the dropdown filters, search bar, and a reset filters button called bbAll (All Technology Resources).  Again, that all works the way I want, and those functions are as such:

 

RecordsGallery1: 

Filter(
'Academic Technology Resources',
(IsBlank(ddSkill.Selected.Value) || ddSkill.Selected.Value in Skill.Value) &&
(IsBlank(ddType.Selected.Value) || ddType.Selected.Value in Type.Value) &&
(IsBlank(ddUser.Selected.Value) || ddUser.Selected.Value in 'End User'.Value) &&
(IsBlank(SearchInput1.Text) || SearchInput1.Text in 'Resource')
)

 

bbAll: 

// Define default filter values
Set(varDefaultFilters, {
Skill: Blank(),
'End User': Blank(),
Type: Blank()
});

// Reset all of the filter controls
Reset(ddSkill);
Reset(ddUser);
Reset(ddType);
Refresh('Academic Technology Resources');
Reset(SearchInput1)

 

Here's my problem... I got the bbUnder button that works as a stand-alone filter for RecordsGallery1, but I need them all to work together.  I'm able to put the variable FilterUnder in RecordsGallery1 and when I press the bbUnder button, it works, but again, I need them all to work together, including the bbAll "reset" feature to get the user back to the default view.

 

bbUnder:

UpdateContext({FilterUnder:Filter('Academic Technology Resources','Status'.Value="Under Review")})

 

 

 

RecordsGallery1

RecordsGallery1.png

 

bbAll

bbAll.png

 

bbUnder

bbUnder.png

Categories:
  • Verified answer
    cha_cha Profile Picture
    4,932 Moderator on at

    Hello @apettit 

     

    Here are some straightforward updates you can make to your code. Here we are using Context variables to control the filter of your gallery.

    //On your screen OnVisible property:
    UpdateContext({TabSelected: ""});
    
    
    //Update this for RecordsGallery1:
    Filter(
    'Academic Technology Resources',
    (IsBlank(ddSkill.Selected.Value) || ddSkill.Selected.Value in Skill.Value) &&
    (IsBlank(ddType.Selected.Value) || ddType.Selected.Value in Type.Value) &&
    (IsBlank(ddUser.Selected.Value) || ddUser.Selected.Value in 'End User'.Value) &&
    (IsBlank(SearchInput1.Text) || SearchInput1.Text in 'Resource'),
    If(TabSelected="Review",'Status'.Value="Under Review",true)
    )
    
    //bbUnder:
    UpdateContext({TabSelected:"Review"})

     

    If your data is expected to exceed 2000 records, you need to learn about "Power Apps Delegations" as it gonna be an issue in the future and affects the accuracy of the search filter.

  • apettit Profile Picture
    245 on at

    @cha_cha I think that's close, however, my bbAll button still doesn't reset the whole thing back to default view of the list.  What do you suggest?  Here is the current OnSelect function of my bbAll button:

     

    // Define default filter values
    Set(varDefaultFilters, {
    Skill: Blank(),
    'End User': Blank(),
    Type: Blank(),
    Status: Blank()
    });

    // Reset all of the filter controls
    Reset(ddSkill);
    Reset(ddUser);
    Reset(ddType);
    Refresh('Academic Technology Resources');
    Reset(SearchInput1)

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @apettit 

     

    For BBAll, just use this: 

    UpdateContext({TabSelected:"All"})
  • apettit Profile Picture
    245 on at

    @cha_cha I may still need a Reset(ddSkill); Reset(ddUser); and Reset(ddType) to clear the three filter dropdowns.  In now resets the bbUnder but doesn't yet reset the 3 filter dropdowns?  Thoughts?  Thank you! 

  • cha_cha Profile Picture
    4,932 Moderator on at

    Ah, sorry I wasn't clear. Just put that line above your current code. You have to keep the old codes to perform the reset.

  • apettit Profile Picture
    245 on at

    @cha_cha That was it!!!  You have no idea how much I appreciate you today! 🙂

     

    I hope you're doing well and thank you so much for the support!  I'm still learning!

  • cha_cha Profile Picture
    4,932 Moderator on at

     @apettit 

    I know that frustration. And please don't forget to learn about Delegation as it's going to be a headache once you get more data in your database.

     

    Some resources for you to get started:

    https://youtu.be/2FQoTp6RXwc

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/delegation-overview

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard