cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EriSto
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
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

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (71,743)