cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnRavas
Level: Powered On

Setting a default value for a choice field

I have a form that is connected to a SharePoint list.  One of the fields is a choice field.  I would like to have a default value for that field.  I can set a default for the field in SharePoint, but it does not carry over to the form.  I don't see a way to set a default in PowerApps.

 

Thanks in advance.

3 REPLIES 3
Highlighted
Community Support Team
Community Support Team

Re: Setting a default value for a choice field

Hi @JohnRavas,

 

Please try to set below formula on the Default property of the dropdown control:

If(EditForm1.Mode = New, {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:0,
  Value:"w"}, 
Parent.Default)

"w" is the default value that you want to set.

 

In addition, the related thread you could refer to:

https://powerusers.microsoft.com/t5/Using-PowerApps/Ability-to-set-a-default-value-for-a-Sharepoint-...

 

I just tested and this seems might not work within the EditForm, you might want to use a Dropdown control directly and then use Patch to update the record. 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Gaëlle
Level 8

Re: Setting a default value for a choice field

@v-monli-msft, THANK YOU SO MUCH !

I searched for so long on the Internet to find this real answer.

Even the "official" article by Carlos Figueira (https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/) written after this thread answer got it wrong.

So thank you, 1000 times thank you.

Beat
Level 8

Re: Setting a default value for a choice field

This worked for me in the DefaultSelectedItems properties of a Combo Box. Thank you!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

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
Users online (5,965)