cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EriSto
Helper II
Helper II

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

That was it, thank you so much @mdevaney !

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (94,183)