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 / Display all items in g...
Power Apps
Unanswered

Display all items in gallery

(0) ShareShare
ReportReport
Posted on by 114

Hello!
I have a gallery but the gallery didnt display all my items unless i filter my date combo box . i want the gallery to display all items even though the gallery isnt filtered. Below is my existing code

Sort(
 Filter(
 coldata,
 IsBlank(cbxmeetingforum.SelectedItems) || IsEmpty(cbxmeetingforum.SelectedItems) || NewMeetingType in cbxmeetingforum.SelectedItems,
 IsBlank(datemeetingdate.SelectedDate) || ThisRecord.MeetingDate >= datemeetingdate.SelectedDate, ThisRecord.MeetingDate < datemeetingdate.SelectedDate + 1

 ),
 
 
 "Meeting Date",
 SortOrder.Descending
)

Thank you in advance ! 

Categories:
I have the same question (0)
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @lumos ,

    The issue with your code is that it filters the data (coldata) based on the selection in the cbxmeetingforum dropdown and the datemeetingdate datepicker control. To show all items even when nothing is selected, you can modify the first Filter function.

     

    Sort(
     Filter(
     coldata,
     /* Check if no meeting type is selected from dropdown */
     IsBlank(cbxmeetingforum.SelectedItems) || IsEmpty(cbxmeetingforum.SelectedItems) 
     /* OR */
     /* Meeting type selected from dropdown matches this record's NewMeetingType */
     NewMeetingType in cbxmeetingforum.SelectedItems,
     /* No date selected in datepicker OR meeting date is on/after selected date */
     IsBlank(datemeetingdate.SelectedDate) || ThisRecord.MeetingDate >= datemeetingdate.SelectedDate
     ),
     "Meeting Date",
     SortOrder.Descending
    )

     

     

     

     


    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.

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

    Hi @lumos ,

     

    Please try this.

    If(IsEmpty(cbxmeetingforum.SelectedItems)&&IsBlank(datemeetingdate.SelectedDate),Sort(coldata, "Meeting Date",
     SortOrder.Descending
    ),Sort(
     Filter(
     coldata,
     IsBlank(cbxmeetingforum.SelectedItems) || IsEmpty(cbxmeetingforum.SelectedItems) || NewMeetingType in cbxmeetingforum.SelectedItems,
     IsBlank(datemeetingdate.SelectedDate) || ThisRecord.MeetingDate >= datemeetingdate.SelectedDate, ThisRecord.MeetingDate < datemeetingdate.SelectedDate + 1
    
     ),
     
     
     "Meeting Date",
     SortOrder.Descending
    ))

     

     

     

    Best regards,

    Rimmon

  • lumos Profile Picture
    114 on at

    it doesnt work but is it possible that the root cause is because in my combobox for date in DefaultDate is Today()? 

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

    Hi @lumos ,

     

    If the date picker has default date, the below formula returns false.

    IsBlank(datemeetingdate.SelectedDate)

    I recommend you set the default date to blank and test again.

     

     

    Best regards,

    Rimmon

  • lumos Profile Picture
    114 on at

    lumos_0-1717657837724.png

    i already did but the combo box displays unrelevant date and the gallery still didnt display every items

  • lumos Profile Picture
    114 on at

    i change AND to OR FOR  IsEmpty(cbxmeetingforum.SelectedItems) || IsBlank(datemeetingdate.SelectedDate), This condition ensures that If datemeetingdate.SelectedDate is blank, the condition is true (all items should be included regardless of their MeetingDate).If datemeetingdate.SelectedDate is not blank, it checks if ThisRecord.MeetingDate is within the selected date range.Using || allows the filter to pass if any of the conditions are true, thus including items that meet any of the filter criteria. 

    Thank you for helping

  • lumos Profile Picture
    114 on at

    i was wrong, it doesnt work actually , when i change it to OR, the gallery is able to display all items but the combo box cannot filter the gallery

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

    Hi @lumos ,

     

    Have you tried method in my first reply? Use If function to show all items when combo box is empty and date picker is blank.

     

     

     

    Best regards,

    Rimmon

  • lumos Profile Picture
    114 on at

    lumos_0-1717725461572.png

    i think the If function return false because my date picker isnt blank, but in the item property of my date picker is also blank

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard