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 / Clear Gallery Filter a...
Power Apps
Answered

Clear Gallery Filter after selecting second filter

(0) ShareShare
ReportReport
Posted on by 46

Hello,

 

I have create a filter for a Gallery as shown ( Abgeschlossen=Approved , Offen=Open)

what can I do, so that if I firstly select "Approved" filter and then "Open", the app will clear the "Approved" filter and only show the "Open" filter vice-versa.

Right now it is applying both the filters simultaneously.

 

rishimarde_0-1644488371776.png

rishimarde_1-1644488704048.png

 

 

Categories:
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Instead of UpdatingContext try using set:

    On App OnStart:

     

    Set(varFilter; true)

     

    On button Abgeschlossen write:

    Set(varFilter; true)

     

    On button Offen write:

    Set(varFilter; false)

     

     

    On gallery itens write:

     

    If(varFilter = True;

    //FILTER BY APPROVED ;

    //FILTER BY OPEN

    )

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

     

     

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @rishimarde ,

    Supposing the the data source  to be filtered is the same.

    Use on each button:

    UpdateContext({activeFilter:Self.Text})

    and on gallery items:

    Filter(datasource,

             Switch(activeFilter,

                         “Approved”,

                         Condition for approved,

                         “Open”,

                          Condition for open,

                           Other values

                )

    )

    This approach will help you in case you need supplementary buttons to filter. 

     

  • rishimarde Profile Picture
    46 on at

    @gabibalaban @Nogueira1306 

    I already have the following in Items field for the Gallery

    rishimarde_0-1644845870172.png

     

  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    If(FilternyApproced = true;

    Sort(Filter(Beschaffunge; 'Created By'.Email = User().Email; Status.Value = "Abgeschlossen"); Datum; Descending);

    Sort(Filter(Beschaffunge; 'Created By'.Email = User().Email; Status.Value <> "Abgeschlossen"); Datum; Descending)

    )

     

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • rishimarde Profile Picture
    46 on at

    Hi @Nogueira1306  

    Thanks for the reply...

    I tried this, but it only works  one way, when I select Approve filter it does clear the offen filter but when I select open filter it does not clear the approve filter

     

    Regards,

    Rishi

  • rishimarde Profile Picture
    46 on at

    @Nogueira1306 

    I tried something and it works, thanks for the help

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard