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 is blank when ...
Power Apps
Answered

Gallery is blank when filter is applied on dropdown for choice column

(0) ShareShare
ReportReport
Posted on by 152

Hi,

 

I have 3 controls for filtering a powerapps gallery in application.

SeachInput, 2 Combo Boxes.

 

3 columns in SharePoint List-

Item Title -> SearchInput

Ratio ->cbxRatio

ItemValue -> cbxItemValue

 

Able to Search and filter gallery based on Ratio properly.

 

ISSUE -But ItemValue filtering is making my gallery blank. cbxItemValue is displaying list of values though.

 

 

Below code is applied on gallery Items property:-

 

Filter('TEST LIST',
StartsWith(
'Item Title',
SearchInput.Text
) && ('Ratio'.Value=cbxRatio.Selected.Value || cbxRatio.Selected.Value = Blank()) && ('ItemValue'.Value=cbxItemValue.Selected.Value || cbxItemValue.Selected.Value = Blank())
)

 

Please help me with this.

Categories:
I have the same question (0)
  • Gochix Profile Picture
    1,937 Moderator on at

    @SD29 ,

     

    Try:

    With({
     _Data:Filter('TEST LIST',StartsWith('Item Title',SearchInput.Text))},
     Filter(_Data,
     (Ratio.Value=cbxRatio.Selected.Value || cbxRatio.Selected.Value = Blank()) && 
     (ItemValue=cbxItemValue.Selected.Value || cbxItemValue.Selected.Value = Blank())))

    Note that ItemValue will make your gallery blank only if you select a value from your cbxItemValue combobox which doesn't match both cbxRatio & cbxItemValue criteria from the SharePoint list.
    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • SD29 Profile Picture
    152 on at

    Yes its blank.

    Till Now the status is- Search and Ratio filter are working independently as well as combined.

    Means If only search text and not filter ratio, my gallery is filtered based on searched text in SearchInput. Also If I search and filter Ratio both, gallery is performing filteration based on both criteria.

     

    Requirement-Hence would require same for ItemValue. If Search Input is blank and Ratio combo box is also not filtered, still I should be able to filter ItemValue and gallery should filter based on Item Value only. 

     

    Currently I gave search input , filtered ratio and selected ItemValue for the item in list matching all the 3 fields, still it is blank.

     

  • WarrenBelz Profile Picture
    156,100 Most Valuable Professional on at

    Hi @SD29 ,

    Set the Default of SearchInput to "" (empty string).
    Other than that, there is no need to change any other code, although this is a bit more specific as Len() = 0 covers both IsBlank() and IsEmpty()

    Filter(
     'TEST LIST',
     StartsWith(
     'Item Title',
     SearchInput.Text
     ) && 
     (
     'Ratio'.Value = cbxRatio.Selected.Value || 
     Len(cbxRatio.Selected.Value) = 0
     ) && 
     (
     'ItemValue'.Value = cbxItemValue.Selected.Value || 
     Len(cbxItemValue.Selected.Value) = 0
     )
    )

    Also you can do this

    Filter(
     'TEST LIST',
     (
     StartsWith(
     'Item Title',
     SearchInput.Text
     ) ||0
     Len(SearchInput.Text) = 0
     ) && 
     (
     'Ratio'.Value = cbxRatio.Selected.Value || 
     Len(cbxRatio.Selected.Value) = 0
     ) && 
     (
     'ItemValue'.Value = cbxItemValue.Selected.Value || 
     Len(cbxItemValue.Selected.Value) = 0
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Gochix Profile Picture
    1,937 Moderator on at

    @SD29 ,

    Yes, based on the code, the gallery should display all records if no criteria is passed via SearchInput, Ratio combobox or ItemValue combobox as it does in my case:

    Gochix_0-1714347198786.png

    Gochix_1-1714347264550.png

    Have you done anything to the ItemValue combobox that is different to Ratio combobox?


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • SD29 Profile Picture
    152 on at

    @WarrenBelz , I already kept the Default of SearchInput to "" (empty string).

     

    I tried with your first approach, but its throwing an error on ItemValue.Value stating- Incompatible types for comparison. These types can't be compared:Table,Text.

     

    SD29_0-1714368579077.png

    please help

  • SD29 Profile Picture
    152 on at

    @Gochix Both Ratio and ItemValue are choice field in SharePoint List and Combo Boxes in app.

    Similar Items Property-

    Choices([@'TEST LIST'.'Ratio')

    Choices([@'TEST LIST'.'ItemValue')

     

    While filling the New Form in app, ItemValue is Combo Box where its data is reflected from Cascading List Created between ItemValue & Status column.

  • WarrenBelz Profile Picture
    156,100 Most Valuable Professional on at

    @SD29 ,

    I was simply using the code you posted assuming it to be valid.

  • SD29 Profile Picture
    152 on at

    @WarrenBelz Its working for form different choice column in combo box but facing issue to achieve for ItemValue combo box filter. I tried giving internal SharePoint list column name for ItemValue as well but no luck.

     

    Can you please help me to achieve this ItemValue Filter for gallery?

  • WarrenBelz Profile Picture
    156,100 Most Valuable Professional on at

    @SD29 ,

    What is the "original" name for ItemValue and have you changed the column type ?

  • SD29 Profile Picture
    152 on at

    Original name is ItemValue1 ..the internal SharePoint List column name & Column name in TEST LIST is ItemValue.

     

    Column Data Type is choice in TEST LIST. In app, ItemValue column values are displayed in combo box where trying to apply filter on.

     

    Tried to replace combo box with drop down in app. Still facing error. Unable to understand how its showing comparision issue

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard