web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter gallary based o...
Power Apps
Answered

Filter gallary based on if the dropdown value exists in the column

(0) ShareShare
ReportReport
Posted on by 22

Im building a powerapp with a gallary that displays a list with different columns from SharePoint.

 

I would like to filter the gallary based on column "Country" using a dropdown. The idea here is that inside the list, each row can have values such as "Sweden" or "Norway" or "Norway and Sweden" or "Finland" for example, and the dropdown has a list of items such as ["Sweden", "Norway"].

 

What I would like to do is that, when i select "Sweden" in the dropdown, the gallary will only show the rows where the word Sweden exists, which means that all rows that have the values "Sweden" and "Norway and Sweden" will show up, but the rows that have the values "Norway" and "Finland" will not show up. The column where the country data is stored inside of the SharePoint list is a text column.

 

i tried using in , such as 'Country' in countrydrop.Selected.Value , but this only filters to rows that contain only "Sweden", it does not display rows that have "Norway and Sweden" for example.

 

How can this be done?

 

Thank you in advance!

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @markuslykonhold 

    You have your in logic backwards!

    It should be:

       countrydrop.Selected.Value in 'Country'

     

    I hope this is helpful for you.

     

  • markuslykonhold Profile Picture
    22 on at

    It worked, thank you so much!

     

    Do you know if its possible to add a search field to the dropdown box? Since I will have 30+ countries in it, It would be easier if the user can search for the country they want to filter for, instead of scroll the list?

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @markuslykonhold 

    You would need to use a Combobox instead of a dropdown.  The combobox brings two features to the table that a dropdown doesn't - Searching and Multiple Selections.

     

    So...if you want search, switch to combobox.

  • markuslykonhold Profile Picture
    22 on at

    Hi Randy, I tried combo box and the search and filtering works, but the default value of the box is somehow nothing? I have the items ["All" ,"Austria", "Denmark", "Sweden", "Finland"] in the combobox, but somehow the first item is always empty? I have the same items in the dropdown and there the default item is always "All", is it possible to have this in combobox as well? 

     

    Thank you!

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @markuslykonhold 

    Since you have switched to a Combobox...the Default property on it does nothing!!

    With a combobox, you need to use the DefaultSelectedItems property (DSI).

     

    That property always needs to be a record that matches the schema of your Items property.

     

    Since your Items property table has a schema of Value (i.e. it's a table with a single column called Value), then you need to specify that in the DSI property.

     

    That property should be: {Value : "All"}

  • markuslykonhold Profile Picture
    22 on at

    Thank you very much for all the help, its sorted out now! 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,033

#2
Valantis Profile Picture

Valantis 632

#3
11manish Profile Picture

11manish 607

Last 30 days Overall leaderboard