cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
crjwarre
Helper I
Helper I

Filter Browse Gallery with Dropdown and Choice Field

Hello,

I am trying to filter a Browse Gallery with a Dropdown as well as a choice field. Currently the dropdown and the "All" feature work, but I cannot get the choice field to work. I'm trying to sort by month and then "Active" status. 

 

Here is what is in my BrowseGallery1 Items List

 

If(MonthDropdown.Selected.Result = "All", 'Client Onsite Calendar', Filter('Client Onsite Calendar', 'Project Month' = MonthDropdown.Selected.Result, Status.Value = "Active"))

 

 

Here is my OnVisible to collect the Month for the dropdown

 

ClearCollect(collectMonth, {Result: "All"});
Collect(collectMonth, Distinct('Client Onsite Calendar', 'Project Month'));

 

 

I'm not sure if what I'm asking is possible, so is there a way to make this function (this is a new dataset and application so I'm not especially attached to the way it is currently selected)

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @crjwarre ,

Your modified code as you told second part is working correctly fine but you facing a problem with the First part FIlter.

So Please use like below.

If(MonthDropdown.Selected.Result = "All", Filter('Client Onsite Calendar', Status.Value = "Active"), Filter('Client Onsite Calendar', 'Project Month' = MonthDropdown.Selected.Result, Status.Value = "Active"))

Thanks,

 Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
VijayTailor
Resident Rockstar
Resident Rockstar

Hi @crjwarre ,

You can Use condition like below for FIlter the Gallery.

Filter(TestAkshay,MyUser.DisplayName = Dropdown2.Selected.UserDIsplayName && Complexity.Value="Complex")

VijayTailor_0-1601875504788.png

Thanks,
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thank you @VijayTailor , but that part of the code is already working. My issue is that all status types are visible with the statement for All months:

If(MonthDropdown.Selected.Result = "All", 'Client Onsite Calendar',

 When a month is selected, they  are correctly filtered for Active, but the first part, which allows for for all months to be visible won't accept the && or "," to add the filter for "Active"

Hi @crjwarre ,

Your modified code as you told second part is working correctly fine but you facing a problem with the First part FIlter.

So Please use like below.

If(MonthDropdown.Selected.Result = "All", Filter('Client Onsite Calendar', Status.Value = "Active"), Filter('Client Onsite Calendar', 'Project Month' = MonthDropdown.Selected.Result, Status.Value = "Active"))

Thanks,

 Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thank you so Much! That worked right away!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,291)