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 / How to filter a galler...
Power Apps
Answered

How to filter a gallery using a dropdown ?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a gallery that I can filter with a SearchBox, the problem is I also want to filter it with a dropdown.

 

In the dropdown (EquipeOT), I manually put the data that I have in the field "EquipePrincipale" of the List, but in the code (attachment 1.png) it shows an error.

 

Here is the code of the galley : Sort(Filter('Liste OT test V2',StartsWith(NumOT,RechercheOT.Text) Or RechercheOT.Text in DescriptionOT, EquipePrincipale = EquipeOT.Selected.Value), DateEdition, SortOrder.Descending) 

 

I would like to know what I have to do to make it work

 

Thanks for your help,

1.png
Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at
  • eka24 Profile Picture
    20,925 on at

    The in function cannot be delegated so I suggest for a dropdown, create a collection Onvisible;

     

    ClearCollect (ColListV2,'Liste OT test V2')

     

    Then change the code to:

     

    Sort(Filter('ColListV2',StartsWith(NumOT,RechercheOT.Text) , RechercheOT.Text in DescriptionOT, EquipePrincipale = EquipeOT.Selected.Value), DateEdition, SortOrder.Descending) 

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi js7,

     

    try to use "search" function and have a look on this article which seems to answer your questions in detail.

     

    Regards

     

    SwiPowE

     

    SwiPowE - Swiss Powerapps Enthusiast

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :
    I noticed that there is a red wavy line under the "=" operator. Usually this is caused by the mismatch of the data types of the values on both sides of the "=" operator.

    Could you tell me:

    • What is EquipeOT.Selected.Value's datatype?
    • What is EquipeOT? A dropdown control or a combo box control?
    • What is EquipeOT's items property?
    • What is EquipePrincipale's datatype?(Does it allow multiple selections)

    Best Regards,

    Bof

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Actually I resolved the problem by using "value", 

     

    EquipeOT is my dropdown

    EquipePrincipale is my choice column

     

    Here is my filter formula : Filter('Liste OT test V2',StartsWith(NumOT,RechercheOT.Text) Or RechercheOT.Text in DescriptionOT,EquipeOT.Selected.Value = EquipePrincipale.Value)

     

    Here is my dropdown formula : Choices([@'Liste OT test V2'].EquipePrincipale)

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 385

#2
Vish WR Profile Picture

Vish WR 367

#3
timl Profile Picture

timl 340 Super User 2026 Season 1

Last 30 days Overall leaderboard