cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kevtun1982
Helper III
Helper III

Dropdown Filter not acting as hoped

All,

 

I have received much help over the last week and I am very nearly there. 

I have managed to add 2 dropdown menus (I may add more) and with help, I have Added the ability to select all but, when I select an option from 1 column and leave the other as All, I am not getting any information.

For example, I want to search for ALL Open tickets. If I select Open and leave the other as All. Nothing appears. If I select Open and People, I get the 1 option currently available.

I have enclosed images of what I am currently seeing.

 

powerapps7.png

Powerapp8.PNG

powerapps9.png

  

1 ACCEPTED SOLUTION

Accepted Solutions

Oh, sorry, I didn't realize the field was already visible as a column in your gallery.

 

You should be able to get what you want by changing the Items property for your Gallery control to the below expression:

If(
    StatusDropdown.SelectedText.Value="All",
    NewNCR,
    If(
        CategoryDropdown.SelectedText.Value="All",
        Filter(NewNCR, Status.Value = StatusDropdown.SelectedText.Value),
        Filter(NewNCR, Status.Value = StatusDropdown.SelectedText.Value && Category.Value = CategoryDropdown.SelectedText.Value)
    )
)

 

_______________________________________________________________________________________________________________________
Did this post solve your problem? Please click Accept as Solution so that others may find it more quickly.
If you liked my response, please give it a Thumbs Up.
Do you want to hear more from me? Visit my blog Marble's Power Corner.

View solution in original post

14 REPLIES 14
Drrickryp
Super User
Super User

@kevtun1982 

Please post the formula for the items property of your gallery.

 

kevtun1982
Helper III
Helper III

Hi @Drrickryp 

 

I have enclosed a snip of the Formula

 

powerapps10.png

Do you have the option All in the Category field as well?

Otherwise it would explain why you get nothing returned when leaving that drop-down as All.

 

_______________________________________________________________________________________________________________________
Did this post solve your problem? Please click Accept as Solution so that others may find it more quickly.
If you liked my response, please give it a Thumbs Up.
Do you want to hear more from me? Visit my blog Marble's Power Corner.

Hi @fugixi 

Yes there is an All option in the category field also

 

Drrickryp
Super User
Super User

 

@kevtun1982 

To account for all four possibilities in the Items property of the gallery:

 

With(
     {SDV:StatusDropdown.Selected.Value, CDV:CategoryDropdown.Selected.Value
     },
 If(
    SDV && CDV = "All", NewNCR,
    SDV = "All" && CDV <> "All", Filter(
                                      NewNCR, Category.Value =  CDV
                                ),
    SDV <> "All" && CDV = "All", Filter(
                                      NewNCR, Status.Value =  SDV
                                ),
    SDV <> "All" && CDV <> "All",  Filter(
                                      NewNCR, Status.Value =  SDV && Category.Value = CDV
                                )
  )
)

 

 

 

 

 

 

 

Could you display the Category field in the gallery as well, to verify the contents?

kevtun1982
Helper III
Helper III

Hi @fugixi 

I tried the info above from @Drrickryp and unfortunately it did not work for me.

The Category Field is as below

 

powerapps11.png

Allright.

Could you add it as a field in the gallery, so we can see the current value for Category for each row as well?

@fugixi 

I am not sure what you mean by add it as a field in the Gallery. The information is pulled from a Sharepoint List that I created. Do you want me to show all of the options available within the Category field?

 

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 (1,888)