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 / List box control - Sel...
Power Apps
Answered

List box control - Select all values as default

(0) ShareShare
ReportReport
Posted on by 240

Hello,

 

I have a dashboard like screen where I use listbox to filter items displayed form a SharePoint list(dashboard->gallery).  It is working fine except for the fact that by default(on load) all items should show in dashboard(gallery). This could be achieved by selecting all items in the ListBox on screen load or by having listbox select all items by default. I am not sure if this is possible. 

 

If this is not possible, is it possible to check if there are no selected items in ListBox

 

Thank you.

Categories:
I have the same question (0)
  • Verified answer
    Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @nemanjasovic011 

    I cannot find a way for a Listbox to select all items by default. You can do this if you use a gallery though.

    But you can check if there are no selected items in the Listbox.

    IsBlank(Concat(ListBox1.SelectedItems,Value))

    Replace ListBox1 with the name of your list box.

    If the value is true then there is nothing selected in the ListBox.

  • jason-hoffman Profile Picture
    2 on at

    I was trying to do this, too. I couldn't find a solution online, and most people simply said it wasn't possible. I decided to approach it differently to get the same result. I had a list with different categories. When a category is selected, a gallery lists the items in that category. But if there is no category selected, I wanted it to show all items in the gallery. Here's what I did:

     

    1. Set the list's default to nothing (i.e. leave it blank).

    2. In the filter for the gallery, add a condition like this:
         If(CountRows(ListBoxCategory.SelectedItemsText)>0,Category.Value in ListBoxCategory.SelectedItems,!IsEmpty(Category.Value)))

     

    The logic is that it counts how many selected items there are in the listbox. If there is at least one selection, it filters the category value to the selection. If there isn't a selection, it just verifies the item has a category. 

     

    So while you can't select all list items by default, you CAN achieve the same functionality.

     

    I hope this helps!

     

     

     

     

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard