Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Filtering a gallery based on a string with a multi-choice dropdown

(0) ShareShare
ReportReport
Posted on by 2

Hi guys

 

I'm not even sure if this is possible, but here goes. 

 

I have a dataverse table which has a text column, that text column contains a string with multiple values. 

For example "a, b, c, d". Then I populate a dropdown with the distinct values of that column. 

 

Now I want to filter my gallery based on the multiple selected items. 

So if I have 3 rows; 

 

1. a, d, c

2. a, c

3. a, b, c, d

 

If I select a I want it to return all the values, if I select a, d I want it to return row 1 and 2 and so on. 

 

Is there a way to do this? 

  • JeroenH Profile Picture
    2 on at
    Re: Filtering a gallery based on a string with a multi-choice dropdown

    My dataset consists of 20k + records so sadly this isn't an option. 

    I have converted the string to a "choices" type column now but it's still not letting me filter for some reason.

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at
    Re: Filtering a gallery based on a string with a multi-choice dropdown

    @JeroenH This will now have the ID back in the result:

     ForAll(
     GroupBy(
     Ungroup(
     ForAll(
     ComboBox1.SelectedItems,
     Search(
     SampleList,
     ThisRecord.Value,
     "request"
     )
     ),
     "Value"
     ),
     "ID",
     "myColumns"
     ),
     
     Patch(Last(
     FirstN(
     ThisRecord.myColumns,
     1
     )
     ),{ID:ThisRecord.ID})
     )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at
    Re: Filtering a gallery based on a string with a multi-choice dropdown

    @JeroenH There is very likely a better solution and mine has one big downside but it might be sufficient for your needs:

     

     ForAll(
     GroupBy(
     Ungroup(
     ForAll(
     ComboBox1.SelectedItems,
     Search(
     SampleList,
     ThisRecord.Value,
     "request"
     )
     ),
     "Value"
     ),
     "ID",
     "myColumns"
     ),
     
     Last(
     FirstN(
     ThisRecord.myColumns,
     1
     )
     )
     )

     

    You have to replce some values based on your setup. So you need to change SampleList with your DataSource and ComboBox1 with the name of your ComboBox. Place this formular in the Items property of your gallery.

     

    Downside 1:

    - This will not work on large datasets

    - We will loose the ID column 😞 ..... I am working on a solution 🙂

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 15

#2
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

Overall leaderboard

Featured topics