How to Set Default Value in Power Apps Dropdown

Do you want to know how to work with the Power Apps dropdown control’s default values and custom values? If so, keep on reading this Power Apps Tutorial. It will demonstrate how to work with the default value on the Power Apps dropdown control in various scenarios.

We will also discuss the following examples, such as:

  1. powerapps dropdown custom values
  2. powerapps dropdown default value
  3. powerapps dropdown default value from SharePoint list
  4. powerapps dropdown reset to the default value
  5. powerapps dropdown default blank or null
  6. powerapps dropdown gets selected value
  7. powerapps dropdown default selected value
  8. powerapps dropdown default value lookup
  9. powerapps dropdown add please select
  10. powerapps dropdown default value from the collection
  11. powerapps dropdown default value current user
  12. powerapps dropdown default value based on another field

Power Apps dropdown custom value

In Power Apps, while we are using a dropdown control, it allows us to add custom values to the dropdown control, whether it is a string, number, choice field, or date.

Here, we will see how to add some custom string values to a Power Apps dropdown control. To work with this, the following steps are:

  • Let’s add a dropdown control to the Power App screen. Go to Insert > Inputs > Dropdown. It will create a dropdown with sample dropdown values such as 1,2,…, and so on.
  • Next, we will add some custom values to the dropdown control. To do this, click on the dropdown control and insert the below values on the dropdown’s Items property.
Items = ["USA","UK","LA", "Japan", "Russia"]

Where USA, UK, LA, Japan, and Russia are the custom values of the dropdown control, and as these are string values, they are denoted with double quotes(“<String>”)

powerapps dropdown custom values
powerapps dropdown custom values

This is how we can set custom values to a dropdown control on the Power Apps.

Also read: How to use Power Apps Gallery Dropdown

Power Apps dropdown default value

When we are working with the Power Apps dropdown control, we can see it shows the first item as the default item. But we can customize the default value on the Power Apps dropdown control.

Here, we will see how to set a default value while working with dropdown control. To work with this, the following steps are:

  • We are going to use the above Power App dropdown control that we have created.
  • On that Power Apps dropdown control, suppose we want to set “Japan” as the default value. So that when the user opens the app it will display the default value instead of the first item.
  • Select the dropdown and set the below expression on the dropdown’s Default property.

Note- Set the default item from the dropdown list; otherwise, it will show the first item as the default value. It is case-sensitive.

Default = "Japan"

The dropdown will display the default item when we set the default value.

powerapps dropdown default value
powerapps dropdown default value

This is how to set a default value on the Power Apps dropdown control.

Check: Power Apps Dropdown Control with SharePoint

Powerapps dropdown default value from SharePoint list

In this section, we will see how to work with the PowerApps dropdown default value from the SharePoint list. That means we will create a Power Apps dropdown control from the SharePoint list and set a default value.

Suppose, we have a SharePoint list named BikeSales having Title, Date, and Choice columns.

powerapps dropdown default value from SharePoint list
powerapps dropdown default value from SharePoint list

Next, add this SharePoint list to the Power Apps, and using the above SharePoint list choice column, we will create a dropdown list on the Power Apps. To do so, the following steps are:

  • Add a dropdown control to the Power Apps screen.
  • Insert the below expression on the dropdown’s Items property to display the choice field items.
Items = Choices(BikeSales.'Payment Mode')

Where,

  1. BikeSales: The name of the SharePoint data source name
  2. ‘Payment Mode’: The name of the choice column.

We can see, it will display all the items from the SharePoint list within the Power Apps dropdown control.

powerapps dropdown default value from SharePoint
powerapps dropdown default value from SharePoint
  • On the above dropdown, we can see, that it is showing the first item as default. But we want to set the ‘Installment Payment’ as the default value.
Items = "Installment Payment"
powerapps dropdown set default value from SharePoint list
Powerapps dropdown set a default value from SharePoint list

Now, play the app in preview mode. We can see, that by default, it will show the default value on the dropdown control.

Set powerapps dropdown default value from SharePoint list
Set powerapps dropdown default value from the SharePoint list

This is how to set the powerapps dropdown default value from the SharePoint list.

Read: Power Apps Gallery Group By [With Real Examples]

Power Apps dropdown reset to the default value

Here we will see how to work with the Power Apps dropdown reset to the default value.

That means we will build a dropdown list within a Power Apps form and set a default value on it. When the user clicks on a refresh button the dropdown will reset to its default value.

To work with this, we are going to use the below SharePoint list named ‘Employees’ having an EmployeeName(A people picker column), Department(Choices column), and JoinDate(a date and time column).

powerapps dropdown reset to the default value
powerapps dropdown reset to the default value

To achieve the above requirement, the following steps are:

  • On the Power Apps screen, add an edit form and connect the form with the above SharePoint list.
Reset The Drop Down to default value in Power Apps
Reset The Dropdown to the default value in Power Apps
  • To set the default value on the department, we will insert the below expression on the DefaultSelectedItems property.
DefaultSelectedItems = If(Form1.Mode=FormMode.New,{Value:"Developer"}, Parent .Default)

Where Form1 is the name of the Power Apps edit form. As per the above expression, if the edit form is a new form, then by default it is displaying the department as Developer.

reset dropdown to default value in Power Apps edit form
reset the dropdown to the default value in the Power Apps edit form
  • To reset the selected value, insert a reset icon to the form and place it just above the department data card. Insert the below expression on the OnSelect property.
OnSelect = Reset(DataCardValue2)

Where DataCardValue2 is the name of the dropdown Datacard name.

Dropdown Resetting to Default Value on Power Apps edit form
Dropdown Resetting to Default Value on Power Apps edit form

Save, publish, and close the app for now. We can see when we reopen the app, by default, it will show the department as Developer. Let’s select another value and then click on the reset icon. We can see, that it will reset the selected value and display the default value.

This is how to reset to the dropdown default value on the Power Apps edit form.

Also check: Power Apps Gallery Patch [With Various Examples]

Power Apps dropdown default blank or null

Here, we will see how to set a blank or null value as a dropdown’s default value on Power Apps. Usually, when we create a dropdown control, it displays the first item as the default item. Suppose we have created a dropdown list using the SharePoint list’s choice column.

powerapps dropdown default blank
powerapps dropdown default blank

But we want to insert a blank value or null into the above dropdown and set it as the default item while working on the Power Apps dropdown control.

To work with this, insert the below expression in the dropdown’s OnSelect property:

OnSelect = ClearCollect(CollDepartment,{Name:" "});Collect(CollDepartment,Choices(Employees.Department))

Where,

  1. CollDepartment: The name of the collection
  2. Name: The name of the collection header

Note: Make sure to set the dropdown’s value as Value on the right side properties panel.

Also, set the dropdown’s Items property to the collection name i.e., CollDepartment.

Items = CollDepartment

Now, we can see an empty value as the default item on the dropdown control like below:

How to set Power Apps dropdown default value to blank
How to set Power Apps dropdown default value to blank

This is how to set the Power Apps dropdown default value to blank.

Power Apps dropdown gets selected value

On the Power Apps, we will see how to display the selected value from the drop-down control.

Let’s take the above dropdown control that we have created to implement this requirement and the following steps are:

  • On the Power App screen, add a label control and place it beside the drop-down. Go to the Insert > Label. Rename the control as ‘SelectedLbl‘. Also, you can give a border to this control.
Power Apps dropdown selected value
Power Apps dropdown selected value

To display the dropdown selected value on the label, insert the below expression on the label’s text property.

Text = 'City Dropdown'.Selected.Value

Here, City Dropdown is the name of the dropdown control.

powerapps dropdown display selected value
Power Apps dropdown display selected value

By default, it is showing the first item of the drop-down list. Let’s save, publish, and play the app. Then select an item from the dropdown list (ex- Chicago), and we can see it will display on the label.

Display PowerApps dropdown selected value
Display PowerApps dropdown selected value

This is how to display the PowerApps dropdown selected value.

Read: Power Apps Gallery SharePoint [With 15+ Examples]

Power Apps dropdown default selected value

Here, we will see how to work with the Power Apps dropdown default selected value.

When we add a Dropdown control into the app, some sample items will appear, such as [“1”, “2”,…] and when we select the Default property of that control, you will notice that it always contains the first item as the Default value, i.e. “1”.

However, it is possible to make the selected value the default value in the Power Apps dropdown controls.

We are going to use the above SharePoint list, i.e., Bike Sales. We will display those data in a Power Apps gallery. Also, we will use a dropdown control to display the choice column, i.e., Payment Mode like below:

PowerApps dropdown default selected value
PowerApps dropdown default selected value

The above gallery’s dropdown, it is showing the first item as the default value. But as per our requirement, we want to display the selected value as the default value.

To do this, insert the following expression on the dropdown’s Default property.

Default = ThisItem.'Payment Mode'.Value

Once we applied this above formula to the default property, we can see all the selected values are displayed as default like below:

Set Default Selected Value of DropDown
Set Default Selected Value of DropDown

This is how to set the default selected value of dropDown.

Power Apps dropdown default value lookup

Here we will see how to work with the Power Apps dropdown default value as lookup. To work with this, we have prepared a SharePoint list named Employees having some columns such as EmployeeName, JoinDate, and Departments (look up column).

powerapps dropdown default value lookup
powerapps dropdown default value lookup

To retrieve the look-up value, we have prepared another list named Departments having a title and ID column.

Power Apps dropdown default value lookup
Power Apps dropdown default value lookup

Also, we have created an edit form using the Employees as the source on the Power Apps like below:

PowerApps default dropdown set lookup Items
PowerApps default dropdown set lookup Items

The above dropdown, it is showing the list of items that looked up from the Departments’ list. But we want to display a lookup item as the default dropdown value. To do this, the following steps are:

  • On the Power Apps edit form, select the department Datacard and insert the below expression on the Default property.
Default = If( Parent.Mode=FormMode.New,{Value:"Finance",ID:3},ThisItem.Departments)

Where Finance and 3 are retrieved from the ‘Departments’ SharePoint list. Make sure to set the edit form’s default mode as ‘New‘(on the right side form’s properties panel).

Now, we can see it will display the lookup value (i.e., Finance) as default in the department like below:

set dropdown default value lookup on powerapps
set dropdown default value lookup on powerapps

This is how to set the dropdown default value from the lookup on the powerapps.

Check: Power Apps Gallery Filter [With Real Examples]

Power Apps dropdown add please select

Here, we will see how to add a text i.e., Please Select to the Power Apps dropdown control. So that, the dropdown will show the text, before selecting an item or if the dropdown selection field is empty.

To do this, the following steps are:

PowerApps dropdown add please select
PowerApps dropdown add please select
  • Select the dropdown and set the ‘AllowEmptySelection’ property as true. So that the dropdown will allow the empty selection.
AllowEmptySelection = true
PowerApps dropdown default add please select
PowerApps dropdown default add please select
  • Next, add a text input and place it on the top of the dropdown control. Also, give a text to the label’s text property as “–Please Select–“.
Text = "--Please Select--"
PowerApps dropdown add please select as default
PowerApps dropdown add please select as default
  • Make sure to set the label’s reorder as send backward like below. So that the label will come under the Power Apps dropdown control.
dropdown add please select text on Power Apps
dropdown add please select text on Power Apps
  • Now, we can see that the text will not visible as it is placed backward in the dropdown control.
  • To make it visible, set the dropdown’s fill property as transparent.
Fill = Transparent

Now we can see the text on the dropdown control. Let’s select a value from the dropdown list, we can see when we select any value from the list it will appear with the item along with the text like below:

PowerApps dropdown set default please select
PowerApps dropdown set default please select
  • Now, we will insert the below expression on the label’s visible property to make the text visible only when the dropdown is blank or not selected any item.
Visible = IsBlank(PaymentModeDropdown.SelectedText.Value)

Where PaymentModeDropdown is the name of the dropdown control.

PowerApps dropdown add text please select
PowerApps dropdown add text please select

Let’s save the app and play it in preview mode. We can see the text “Please select” will appear when any item is not selected and disappear once the item is selected. This is how to add Please select text on the Power Apps dropdown control.

Power Apps dropdown default value from the collection

Here, we will see how to set a default value on the Power Apps dropdown control that retrieves from a collection.

To work with this, the following steps are:

  • Suppose, we have prepared a collection on the Power Apps screen’s OnVisible property like below:
OnVisible =  ClearCollect(collSubject, {Subject:"Java"}, {Subject:"SharePoint"}, {Subject:"PowerApps"},{Subject:"PowerApps"}, {Subject:"Java"}, {Subject:"All"})
  • Save and publish the app for now, then close it. When we reopen it, we can find the collection under Views > Collections.
  • Let’s create a dropdown control using the above collection and make sure not to use duplicate values. To do this, insert the below expression on the dropdown’s items property.
Items = AddColumns(GroupBy(collSubject,"Subject","GroupSubject"),"Count",CountRows(collSubject))

Where,

  1. collSubject: The name of the collection
  2. Subject: The name of the collection column that we want to group
  3. GroupSubject: The name of the new group column name

Now, we can see the dropdown will appear like below:

powerapps dropdown default value from collection
powerapps dropdown default value from collection
  • Now, we want to set All as the default value in the Power Apps dropdown control. To make this collection value as default item, set the dropdown’s default as below:
Default = "All"

Let’s play the app in preview mode. We can find the dropdown will appear with the collection value as default.

powerapps dropdown set default value from collection
powerapps dropdown set a default value from the collection

This is how to set a default value on the powerapps dropdown from the collection.

Check: How to Remove Duplicates in Power Apps Dropdown

Power Apps dropdown default value current user

Here, we will see how to display the current user on the Power Apps as a default value.

To implement this, we are going to use the above SharePoint list named Employees having a people picker column i.e., EmployeeName. We have prepared an edit form using this SharePoint list on the Power Apps screen.

powerapps dropdown default value current user
powerapps dropdown default value current user
  • On the above EmployeeName DataCard, we want to display the current login user, when the user opens a new form.
  • To display the current user as a default value, we need to insert the below expression on the dropdown’s default property.
Defaulyt =If(
    Form1.Mode = New,
    {
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        Claims: Concatenate(
            "i:0#.f|membership|",
            User().Email
        ),
        DisplayName: User().FullName,
        Email: User().Email
    },
    ThisItem.EmployeeName
)

Where,

  1. User().FullName: It provides the logged-in user’s display name
  2. User().Email: It provides the current user’s email address
  3. ThisItem.EmployeeName: The EmployeeName is the name of the SharePoint people picker column.
PowerApps dropdown show current user as default value
PowerApps dropdown shows the current user as the default value

This is how to PowerApps dropdown shows the current user as the default value.

Power Apps dropdown default value based on another field

Here, we will see how to set a Power Apps dropdown default value based on another field.

That is, we will create a collection and use it to populate two dropdown controls. When the user selects an item from the first dropdown list, the item is automatically displayed in another dropdown. The following steps must be taken to meet this requirement:

  • On the Power Apps screen, we will add a button control and insert the below expression on the OnSelect property to create a collection on a button click.
OnSelect = ClearCollect(CollCountry,{Country: "USA",Capital: "Washington"},{Country: "UK",Capital: "Landon"},{Country: "India",Capital: "NewDelhi"})

Where,

  1. CollCountry: The name of the collection
  2. Country, Capital: The header name of the collection
powerapps dropdown default value based on another field
powerapps dropdown default value based on another field
  • Next, we will add two dropdown controls to the Power Apps screen and insert the below expressions into the dropdown’s Items properties respectively.
Items = CollCountry.Country     // For the first dropdown
Items = CollCountry.Capital     // For the second dropdown
  • Set the AllowEmptySelection property as true in both dropdowns.
powerapps dropdown set default value based on another field
PowerApps dropdown set default value based on another field
  • Next, insert the below expression in the second dropdown’s Default property.
Default =  LookUp(CollCountry,Country=CountryDropdown.Selected.Country,Capital)

Where CountryDropdown is the name of the dropdown control.

Power Apps how to set field default value based on another value
Power Apps how to set field default value based on another value

Now, play the app in preview mode. First, click on the button to create the collection on Power Apps.

We can see when we select any item from the first dropdown control, by default it will display the respective item in the second dropdown control. (Ex – UK)

PowerApps set default value based on another field from a dropdown
PowerApps set default value based on another field from a dropdown

This is how to set the default value based on another field from a Power Apps dropdown.

Also, you may like the below Power Apps tutorials:

Conclusion

From this Power Apps tutorial, we learned all about the Power Apps dropdown default value as well as the custom values. Also, we have discussed the below topics such as:

  • powerapps dropdown custom values
  • powerapps dropdown default value
  • powerapps dropdown default value from SharePoint list
  • Power Apps dropdown reset to the default value
  • powerapps dropdown default blank
  • powerapps dropdown gets selected value
  • powerapps dropdown default selected value
  • powerapps dropdown default value lookup
  • powerapps dropdown add please select
  • powerapps dropdown default value from the collection
  • powerapps dropdown default value current user
  • powerapps dropdown default value based on another field
>