cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ejules
Frequent Visitor

How to set a pre-populated default value of a Dropdown in EditScreen for a SharePoint Choice field?

Hi Everybody,

 

I'm currently trying to simply set the Default value of a Dropdown in an Edit Form (Form is opened and the Dropdown should have a pre-selection). Even though I did extensive research I couldn't find a solution for a Sharepoint choice field (as I don't know how to find the ID's of those choices and how to reference it?

I have the DropDown with the Selections from Sharepoint ("Inland", "Ausland") and would like to be the Default for a blank form to be "Inland".

  PowerApps1.JPGPowerApps2.JPG

 

Thank you so much for your help.

 

Regards,

ejules

38 REPLIES 38

Hi, Have tried your code however  - error says Choices have invalid arguments

 

LookUp(Choices(Devices.ManufacturerName),Value="Select")

 

Please can you help?

 You can also use this option I posted in this other thread on the combobox/drop-down DefaultSelectedItems:

 

If(IsBlank(YourDataCardValue.Selected.Value), {Value: "Desired Choice Value"}, Parent.Default)

 

Now, if you're just wanting placeholder text to instruct the user then I'd say don't use a default and just set the property InputTextPlaceHolder to: "Choose one" or "Select"

Data Source is set to a SharePoint list. If a default value has been set on the SPFieldName within the list, the LookUp function is not required.

 

Choices([@'SPListName'].'SPFieldName')

It is the same syntax used for the Items property.

It's almost two years after your post, and I still can't get this to work. One would think this would be a simple thing to do. And this platform is supposed to be for non-programmers to use? P-lease! PowerApps sucks. 😠

@SteveCochrane - What formula are you using and is it in the DefaultSelectedItems property?

Frown
Advocate I
Advocate I

Three years after this post, and still no luck. None of the solutions offered worked for me. PA has some cool features, but what it is incapable of, is mind blowing!!!!!!!!

    My project has a button to set the default value which is similar to this case. The use case for this is like when you make purchases online - fill in the shipping address, then click the "Buying address is same as shipping address" button, and the items (including dropdown lists) are copied over to the next section. I got it to work similarly to what you outlined above. The button sets a local variable called "btnPress" to true. Here is the DefaultSelectedItems property:

 

    If(btnPress, {Value: DataCardValue13.Selected.Value}, Parent.Default)

 

     The DataCardValue13 is another dropdown list. The Default property is blank.

 

     I still don't understand why PowerApps doesn't automatically add the default values in SPO lists, though. On Monday, I start teaching non-IT people how to use PowerApps and Power Automate. Yay.

 

Steve in Spain 

 

vwyankee
Advocate III
Advocate III

@SteveCochrane - It is a wonder why it can't be put in there by default, but the solution is pretty simple once you understand how defaults work.

 

@Frown - What is it that you're trying to use? I just opened one of my test apps that has a choice field and it worked no problem for my new form just setting the DefaultSelectedItems property to:

 

If(frmUsrEdit.Mode=FormMode.New, {Value: "Software"}, Parent.Default)
 
frmUsrEdit is the name of my form and Software is one of the choices in the SharePoint column.
JerryH
Resolver III
Resolver III

I used the following in my Dropdown field - Items: ["Select" , "Area 1" , "Area 2" , "Area 3"]

Select.PNG

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,178)