cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
cwebb365
Level 10

Set Default Selected Value of DropDown

You would think this would be simple as setting the default value to an ID of the drop down but aparently it's not that easy. 

 

Anyone know how I can set the default value that shows in the drop down or basically the selected Item on the dropdown control. It always shows the first value no matter what and the only way I can get it to show the value is using Filter, which does no good when you go to change the value. 

 

Is there a special value you have to pass into Default other than primary key value for it to know which record to use? 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Set Default Selected Value of DropDown

@cwebb365 

Yes, for a DropDown, the Default must be the same as the field that you are displaying in the dropdown.

So, if you are displaying Name in the DropDown, then you set the default to whatever text value you want for that field.  In your case, you're looking up the value and assigning name to the default...all is good.

 

By the way, the DropDown retains the fields of the record,  so elsewhere, you can get to the DropDown.Selected.ID or any other field in the record.

 

Glad you resolved it.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

2 REPLIES 2
cwebb365
Level 10

Re: Set Default Selected Value of DropDown

Solved it, Default property needs set to Lookup(datasource,ID = ThisItem.ID,Name) 

Was missing the ,Name part which is what is showing in the Dropdown field. 

Super User
Super User

Re: Set Default Selected Value of DropDown

@cwebb365 

Yes, for a DropDown, the Default must be the same as the field that you are displaying in the dropdown.

So, if you are displaying Name in the DropDown, then you set the default to whatever text value you want for that field.  In your case, you're looking up the value and assigning name to the default...all is good.

 

By the way, the DropDown retains the fields of the record,  so elsewhere, you can get to the DropDown.Selected.ID or any other field in the record.

 

Glad you resolved it.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,966)