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 / Reset Gallery to show ...
Power Apps
Answered

Reset Gallery to show all data/remove filter

(0) ShareShare
ReportReport
Posted on by 186

I gave a gallery filtered by two drop down boxes - "Team Assignment" and "Current Stage".

 

Drop_TeamAssign.Items =  Choices('SharePointList'.'Team assignment')   and same for 'Current Stage'

 

How can I add an "All" option to the Choice, which would essentially reset the filter. These would operate separately, if CurrentStage is "all", the selection in Drop_TeamAssign filter would still function.

 

Filter('SharePointList', Stage.Value=Drop_Stage.Selected.Value, 'Team assignment'.Value= Drop_TeamAssign.Selected.Value)

Categories:
I have the same question (0)
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @grantreid 

     

    To configure this, you can use the below expressions:

    App -> OnStart -> ClearCollect(TeamAssignmentCollection, {Value:"All"});Collect(TeamAssignmentCollection,Choices('SharePointList'.'Team assignment'));
    ClearCollect(CurrentStageCollection, {Value:"All"});Collect(CurrentStageCollection,Choices('SharePointList'.'Current Stage'));

    Now, in the Items property of the Dropdowns:

    Drop_Stage -> CurrentStageCollection
    Drop_TeamAssign -> TeamAssignmentCollection

    Then, finally you can set the Filter expression like:

    If Choice Type column is single select:

    Filter('SharePointList', If(Drop_Stage.Selected.Value = "All", true,Stage.Value=Drop_Stage.Selected.Value), If(Drop_TeamAssign.Selected.Value = "All", true, 'Team assignment'.Value= Drop_TeamAssign.Selected.Value))

    If Choice Type column is multi select:

    Filter('SharePointList', If(Drop_Stage.Selected.Value = "All", true,Drop_Stage.Selected.Value in Stage.Value), If(Drop_TeamAssign.Selected.Value = "All", true,Drop_TeamAssign.Selected.Value in 'Team assignment'.Value))

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • grantreid Profile Picture
    186 on at

    Hi


    Thanks for the reply. 

    I understand what the Collect and ClearCollect is attempting to do. When I add TeamAssignmentCollection to the dropdown items, its empty.   If I just make the ClearCollect something simple like:

     

    App- OnStart = ClearCollect(TeamAssignmentCollection,{Value:"All"}, {Value:"123"});

    DropDown - Items = TeamAssignmentCollection

     

    and ignore the other code you suggested, the dropdown is empty. I've missed something?

     

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @grantreid 

     

    In Edit mode, when you place an expression on the "OnStart" property, it is not triggered automatically, this should be done manually for the current session. If you save it and reopen the app, the collection will be filled automatically. In this case, you need to trigger the OnStart by following below steps:

    Select App from the left menu, then click on the three dots beside it and then select Run OnStart, this way the collection will be populated with the values.

    dex.png

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • grantreid Profile Picture
    186 on at

    Thanks for your help, much appreciated.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard