Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Can't display items in gallery

(0) ShareShare
ReportReport
Posted on by 20
In Play mode of my Power App, no items in the gallery display unless I click in the search field and click on the search icon. It some times works with the filters, but then clears as soon as the filters are cleared.
 
In Edit mode, it works just fine both when editing the app and in preview.  
 
This is the code I'm using:
 
Sort(Filter(
   'Test Document Repository',
    (IsBlank(ComboBoxGroup.SelectedItems) Or IsEmpty(ComboBoxGroup.SelectedItems) Or
 'Service Element/Group'.Value in ComboBoxGroup.SelectedItems.Value),
    DropdownCategory.Selected.Value = Blank() Or DropdownCategory.Selected.Value = Category.Value,
    DropdownSubcategory.Selected.Value = Blank() Or DropdownSubcategory.Selected.Value = Subcategory.Value,
    DropdownDocType.Selected.Value = Blank() Or DropdownDocType.Selected.Value = 'Document Type'.Value,
    ComboBoxApprover.Selected.DisplayName = Blank() Or Approver.DisplayName in ComboBoxApprover.SelectedItems.DisplayName,
    FilterGallery.Value in 'Document Title'
),
If(varSortType=true,'Document Title','Publication Date'),If(varSort=true,SortOrder.Ascending,SortOrder.Descending))
 
Categories:
  • PA-novice Profile Picture
    20 on at
    Can't display items in gallery
    The Service Element/Group is a another gallery. I used a video from Reva Dorrani to create the checkboxes. (This is the link I think: Multi Select Filters in Power Apps with Combo box, Checkboxes & No Delegation❗ (youtube.com)). I don't get errors. I do see a delegation message, but since I'm not going to have more than 500 files, I didn't worry about that right now. 
     
    This is the value in that gallery: 
    Choices('Test Document Repository'.'Service Element/Group')
     
    When I didn't allow for blanks or no selected items, no files were listed in the gallery in edit mode.
    When I added that, files are listed and can be filtered. 
     
    I'm not sure what else you need to know. Users are filtering the files based on the values
    in the drop-down fields. They are searching for the Document Title and sorting based on the publication
    date and document title.

    Update: I commented out the code for the blanks (Test Document Repository',
        (IsBlank(ComboBoxGroup.SelectedItems) Or IsEmpty(ComboBoxGroup.SelectedItems) Or
     'Service Element/Group'.Value in ComboBoxGroup.SelectedItems.Value)), it made no difference.
    It still doesn't work in display mode.
  • Michael E. Gernaey Profile Picture
    40,272 Super User 2025 Season 1 on at
    Can't display items in gallery
    Hi 
     
    I am not sure that the way you wrote it is what you meant so I am trying to validate.
     
    So I just sort of cleaned it up for my eyes and I am surprised you dont see errors, or I am missing something.
    In this Section
        	(
    		IsBlank(ComboBoxGroup.SelectedItems) Or 
    		IsEmpty(ComboBoxGroup.SelectedItems) Or
    		'Service Element/Group'.Value in ComboBoxGroup.SelectedItems.Value
    		)
    
    I am confused as to why you are checking if 'Service Element/Group'.Value is in the Combo 
    Selected Items, instead of checking if those Items are in the 'Service Element/Group'.Value
    
    Also what is that? Is this a Multi-Select Option?
    Where does 'Service Element/Group'.Value come from???
    
    Normally you check if a field on the Screen, is in the OptionSet list etc
    
    Also, I don't usually check for Blank() which is also probably why its not working unless you
    select stuff
    
    Lastly, can you explain why in each case you are checking .Value such as Category.Value???
    
    Need more information as to me I dont see Ands or Ors in the right place (or at all)
    and don't follow the logic.
     
     
     
     

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard