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

How to filter based on selected dropdown value

Hi all.

 

I added a choice column to my SharePoint list to specify if an activity is "Open" or "Closed".
I added a dropdown list on my dashboard screen, which has the column i mentioned above as the items.

 

So far, so good. Where I'm running into a problem, is filering by the seleted value in the dropdown. I just haven't been able to figure out how to code it into my gallery filter. 

 

I attached the code I currently use, that only uses the search field text (see below). Any tips on how I can make it filter based on the selected dropdown, and text? Ive been playing around trying to make it work for hours but I am getting nowhere. 

 

Thanks for your time.

 

SortByColumns(
    Filter(
        Activity_Reports,
        StartsWith(
            ES_Nr,
            TextSearchBox1.Text
        ) || StartsWith(
            SK_Fnr,
            TextSearchBox1.Text
        )
    ),
    "Created",
    If(
        SortDescending1,
        Ascending,
        Descending
    )
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@EriSto 

You should be able to accomplish the FILTER by adding another criteria for the dropdown like this.

SortByColumns(
    Filter(
        Activity_Reports,
        StatusColumnName.Value = Dropdown_Status.Selected.Value,
        StartsWith(
            ES_Nr,
            TextSearchBox1.Text
        ) || StartsWith(
            SK_Fnr,
            TextSearchBox1.Text
        )
    ),
    "Created",
    If(
        SortDescending1,
        Ascending,
        Descending
    )
)

 

---
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

2 REPLIES 2
Highlighted
Super User III
Super User III

@EriSto 

You should be able to accomplish the FILTER by adding another criteria for the dropdown like this.

SortByColumns(
    Filter(
        Activity_Reports,
        StatusColumnName.Value = Dropdown_Status.Selected.Value,
        StartsWith(
            ES_Nr,
            TextSearchBox1.Text
        ) || StartsWith(
            SK_Fnr,
            TextSearchBox1.Text
        )
    ),
    "Created",
    If(
        SortDescending1,
        Ascending,
        Descending
    )
)

 

---
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

Highlighted

That was it, thank you so much @mdevaney !

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,690)