Do you know how to set the Power Apps list box default value? If not, no need to worry!
This Power Apps tutorial will teach all the information about the Power Apps list box default value, including:
- Power Apps List Box Default Multiple
- Working with Power Apps List Box Default Select All
Power Apps List Box Default Value
The Power Apps Default() function can be utilized to pre-fill data entry forms, streamlining the data input process. This function generates a record that contains the default values for the data source.
Here, we will discuss how to set the PowerApps listbox default value with two different scenarios.
Scenario -1:
I have created a Blank canvas app with a list box control. Now, I would like to add “Department Items/Records” manually as in the screenshot below.
Now, I would like to set the List Box default value as “IT”, and whenever the user opens/runs the app, the Listbox control displays “IT” as the default selected value like below.
To work around this, follow the below-mentioned steps. Such as:
1. Open Power Apps with your respective Microsoft credentials -> Create a Blank canvas app as shown below.
2. On the Power Apps Screen -> Insert a List box control and set its Items property to the code below.
Items = [
"IT",
"Finance",
"HR",
"Marketing",
"Sales"
]
Where,
- “IT”, “Finance”, “HR”, “Marketing”, “Sales” = Power Apps List box items
3. Next, select the List box control and set its Default property as:
Default = "IT"
Where,
- “IT” = Power Apps Default Property Value
4. Once your app is ready, Save, Publish, and Preview the app. The list box control displays the default selected value, as in the screenshot below.
This is how to set a Power Apps listbox default value.
Scenario -2:
I have a SharePoint list named “Product Details” and this list contains the below fields.
Column Name | Data Type |
Product Name | It is a default single line of text |
Price | Currency |
Manufacturer | Choice |
Image | Image |
Refer to the below image:
In Power Apps, there is a list box control. This list control retrieves the Title column [Product Name] items/records from a SharePoint list as shown below.
Now, I want to set the List Box default value as “Laptop” and when the user opens/runs the app, the Listbox control displays “Laptop” as the default selected value.
Refer to the below screenshot:
To achieve it, follow the below steps. Such as:
1. On the Power Apps -> Connect the respective SharePoint Online list [Product Details] as shown below.
2. Then, select the Power Apps Screen -> Insert a List box control and set its Items property to the code below.
Items = 'Product Details'.Title
Where,
- ‘Product Details’ = SharePoint Online List
- Title = SharePoint List Title Field
3. Then, select the List box control and set its Default property as:
Default = "Laptop"
4. Save, Publish, and Preview the app. The list box control displays the default selected value, as in the screenshot below.
This is all about the PowerApps listbox default selected value using the SharePoint list.
Power Apps List Box Default Multiple
Do you want to set multiple default values in the Power Apps list box control? Unfortunately, the Power Apps List box control lacks a property that permits the setting of multiple default values.
However, the “Select Multiple” property in the list box control does provide the ability to choose more than one item in the list box.
Power Apps List Box Default Select All
It’s important to note that only one default item can be selected at once. To choose multiple items, consider using the Combo Box control instead. Additionally, it’s worth mentioning that SelectedItems is read-only and denotes a data table of selected items for a multi-select list box.
Conclusion
I trust this Power Apps tutorial taught in detail information about the Power Apps List box default value, including:
- Power Apps List Box Default Multiple
- Working with Power Apps List Box Default Select All
You may like the following tutorials:
- How to Set Default Selected Item in Power Apps Gallery?
- How to Filter Multiple Person Column in Power Apps?
- How to Filter List Box in Power Apps?
- How to Patch Power Apps Collection to SharePoint List?
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com