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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,015)