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 / Gallery not filtering ...
Power Apps
Answered

Gallery not filtering on Text field

(2) ShareShare
ReportReport
Posted on by 224 Season of Giving Solutions 2025
 Hello,
I have a combo box that I want my Gallery to filter on.  The combobox currently has Supervisor selected but the Gallery below is not filtering on the Combobox selection
 
 
The combo box items property is 
Filter(Commands,StartsWith(Title,Self.SearchText))    Ref: Reza Dorrani https://www.youtube.com/watch?v=3tcmlvxgafk
 
For the gallery I have items property = 
Filter(Commands, Title.Text in 'Combobox1-Title_1')
 
I want to eventually combine that filter with the filter of other combo boxes.
Filter(Commands, EchII.Value='ComboboxCanvas2-EchII_1'.Selected.Value||'ComboboxCanvas2-EchII_1'.Selected.Value= "All") Ref Reza Dorrani
 
The filter in the gallery works for choice columns ("EchII") but not for the text column ("Title")
 
Any suggestions is appreciated.
 
Sharon
 
 
Categories:
I have the same question (0)
  • Verified answer
    Haque Profile Picture
    3,653 on at
     
    Hi @,
     
    For a text column like Title, you should compare directly to the selected value of the combo box:
     
    Filter(
        Commands,
        (IsBlank('Combobox1-Title_1'.Selected.Value) || 'Combobox1-Title_1'.Selected.Value = "All" || Title = 'Combobox1-Title_1'.Selected.Value)
    )
    

    Combined Filter with Choice Column, now merge with your EchII choice column filter:

    Filter(
        Commands,
        (IsBlank('Combobox1-Title_1'.Selected.Value) || 'Combobox1-Title_1'.Selected.Value = "All" || Title = 'Combobox1-Title_1'.Selected.Value),
        (IsBlank('ComboboxCanvas2-EchII_1'.Selected.Value) || 'ComboboxCanvas2-EchII_1'.Selected.Value = "All" || EchII.Value = 'ComboboxCanvas2-EchII_1'.Selected.Value)
    )
    
     
    Please note that the key difference is that choice columns in Dataverse are stored as records with a .Value property, while text columns are plain strings. That’s why your filter works for EchII but not for Title.
     
    An optmized version of the code:
    Filter(
        Commands,
        // Title filter (text column)
        (IsBlank('Combobox1-Title_1'.Selected.Value) 
            || 'Combobox1-Title_1'.Selected.Value = "All" 
            || Title = 'Combobox1-Title_1'.Selected.Value),
    
        // EchII filter (choice column)
        (IsBlank('ComboboxCanvas2-EchII_1'.Selected.Value) 
            || 'ComboboxCanvas2-EchII_1'.Selected.Value = "All" 
            || EchII.Value = 'ComboboxCanvas2-EchII_1'.Selected.Value)
    )
    

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     
     
  • Verified answer
    11manish Profile Picture
    3,333 on at
    Correct Gallery Filter for Text Column
    Use:
    Filter(
        Commands,
        Title = Combobox1.Selected.Title
    )
    If the combobox displays the Title field, this will filter correctly.

    Check these properties:
    ComboBox Items
    • Filter(Commands, StartsWith(Title, Self.SearchText))
    ComboBox DisplayFields
    • ["Title"]
    ComboBox SearchFields
    • ["Title"]
  • S S Profile Picture
    224 Season of Giving Solutions 2025 on at
    @Haque and @11manish   Thank you!  I will try these solutions out and I'll post how it goes.  I very much appreciate the quick response
     
  • S S Profile Picture
    224 Season of Giving Solutions 2025 on at
     
    I tried both of your solutions and they both worked like a charm!  Thank you for the detailed explanation of why mine didn't work.  
     
     
     
     
    and
     
     
     

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 May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard