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

Notifications

Announcements

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

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,

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at
  • eka24 Profile Picture
    20,923 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
    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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard