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.
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!
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.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2