Power Apps  

How to Use Default and DefaultSelectedItems in PowerApps Controls

Introduction

When building apps in PowerApps, you often work with controls that allow users to select or enter data, such as Dropdowns, ComboBoxes, and ListBoxes. Two properties Default and DefaultSelectedItems are crucial for controlling what the user sees initially.

1. Default

The Default property specifies the value that a control initially displays when the app loads. It applies to controls that accept a single value, such as Text Input, Dropdown, Radio Button, or Toggle controls.

Key Points:

  • Works with single-select controls.

  • Can reference static values or dynamic data sources.

  • Ensures consistency in forms, pre-filling known or recommended values.

Example Usage:
Suppose you have a Dropdown for selecting a country:

Dropdown1.Items = ["USA", "Canada", "India"]
 Dropdown1.Default = "Canada"
  • When the app loads, Canada will appear as the selected value in the dropdown.

Dynamic Default:
You can also use a formula to dynamically set the default based on context:

Dropdown1.Default = If(User().Email = "[email protected]", "USA", "India")

This sets USA for the admin user and Mexico for everyone else.

2. DefaultSelectedItems

The DefaultSelectedItems property is used primarily for multi-select controls, like ComboBoxes and ListBoxes. It determines which items are initially selected when the app or form loads.

Key Points:

  • Can handle single or multiple values.

  • Must reference records or table data matching the items in the control.

  • Critical for forms that edit existing data from a data source like SharePoint, Dataverse, or SQL.

Example Usage:
Suppose you have a ComboBox for selecting multiple programming languages:

ComboBox1.Items = ["PowerApps", "Python", "JavaScript", "C#"]
ComboBox1.DefaultSelectedItems = ["Python", "JavaScript"]
  • When the app starts, Python and JavaScript will already be selected.

Dynamic Example with Data Source:
Imagine a SharePoint list storing user roles:

ComboBoxRoles.Items = Choices(UserRoles.Role)
ComboBoxRoles.DefaultSelectedItems = Filter(UserRoles, UserEmail = User().Email)
  • This will pre-select roles assigned to the current user.

3. Key Differences

PropertySingle-selectMulti-selectType of Value
Default✅ Yes❌ NoSingle value (text, number, Boolean)
DefaultSelectedItems❌ No✅ YesTable/record that matches Items source
  • Use Default for single value fields.

  • Use DefaultSelectedItems for controls supporting multiple selections.

4. Common Scenarios

  1. Pre-fill a user’s department:

    • Control: Dropdown

    • Property: Default

    • Formula: Default = User().Department

  2. Load saved selections in an edit form:

    • Control: ComboBox

    • Property: DefaultSelectedItems

    • Formula: DefaultSelectedItems = ThisItem.Skills

  3. Conditional defaults:

    • Formula: If(Today() > Date(2026,2,18), "Expired", "Active")

    • Useful for dynamic forms or dashboards.

5. Tips and Best Practices

  • Always ensure DefaultSelectedItems references actual items in the control’s Items property; otherwise, the default will not appear.

  • Use LookUp to match complex records for DefaultSelectedItems.

  • For forms connected to data sources, always use ThisItem.FieldName to maintain consistency between EditForm and NewForm modes.

  • Combine If and User() for dynamic personalization.

Conclusion

Understanding Default and DefaultSelectedItems is essential for creating user-friendly, dynamic, and data-driven PowerApps applications. By setting these properties correctly, you can:

  • Pre-populate forms efficiently

  • Improve user experience

  • Reduce errors in data entry

Mastering these properties ensures your apps feel intelligent and context-aware.