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

Setting Choice Field default value on New Form

I have a PowerApps form linked to a SharePoint list.  The SP list has a choice field (let's call it Status) with three choices.  For the sake of argument I'll say the choices are choice1, choice2,  choice3. 

 

The PowerApps form is a New form so I can create a new item in the SP list.  I want the dropdown/choice field in the form (The SP Status field) from the SP list to default to choice1. 

 

I thought this was something easy but turns out not so much based on all my failed attempts to make this work. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @Paul2000 ,

Do you want your single choice field display "choice1" as default value in new form?

Could you tell me whether do you use combo box or drop down to choose for this single choice filed?

1)If you use combo box

Firstly, unlock this field.

Then set the combo box's DefaultSelectedItems:

 

{Value:"choice1"}

 

Then, the combo box will display choice1 as the default value instead of blank value.

2267.PNG

 //in my test, my choice is "Complete","Incomplete".

2)If you use drop down, this will be a little complex.

Choice field display as combo box in default. Using drop down to update need to do more customizations.

Firstly, unlock this field.

Then, delete the original combo box in the choice field.

Insert a drop down to this field's data card.

Set the drop down's Items:

 

Choices(listname.choicefieldname)

 

 Set the drop down's Default:

 

"choice1"

 

Set the datacard's Update:

 

Dropdown1.Selected

 

If you mind the error message of "Y" property, you could just remove the formula in it.

22601.gif

 

 Then, the drop down will display choice1 as the default value instead of blank value.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @Paul2000 ,

You can make the Default of the field on the form (I will use ChoiceBox for the dropdown and Form2 for the form) - replace with your control and form names. For the Default of your control in Form2

If(
   Form2.Mode = FormMode.New,
   ChoiceBox.Selected.Value,   /depending on the list formation, may be Choices.Selected.Status
   Parent.Default
)

  

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

v-yutliu-msft
Community Support
Community Support

Hi @Paul2000 ,

Do you want your single choice field display "choice1" as default value in new form?

Could you tell me whether do you use combo box or drop down to choose for this single choice filed?

1)If you use combo box

Firstly, unlock this field.

Then set the combo box's DefaultSelectedItems:

 

{Value:"choice1"}

 

Then, the combo box will display choice1 as the default value instead of blank value.

2267.PNG

 //in my test, my choice is "Complete","Incomplete".

2)If you use drop down, this will be a little complex.

Choice field display as combo box in default. Using drop down to update need to do more customizations.

Firstly, unlock this field.

Then, delete the original combo box in the choice field.

Insert a drop down to this field's data card.

Set the drop down's Items:

 

Choices(listname.choicefieldname)

 

 Set the drop down's Default:

 

"choice1"

 

Set the datacard's Update:

 

Dropdown1.Selected

 

If you mind the error message of "Y" property, you could just remove the formula in it.

22601.gif

 

 Then, the drop down will display choice1 as the default value instead of blank value.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AmolMane
Frequent Visitor

Hey it's helped me too, i had combo box, i used {Value:"Choice1"}. thanks for your help!

When I use If(Form2.Mode = FormMode.New,
DataCardValue39.Selected.Value,Parent.Default)

 

I get the error stating the "Invalid argument type, 'record', expecting Text value instead."

This error throws me constantly working with dropdowns, is there a standard protocol I'm missing that converts selected.value to .text?

 

When I used this formula:

If(Form2.Mode = FormMode.New,
Choices.Selected.Status,Parent.Default)

 

I got the error that there is the wrong use of "." somewhere?

It's a choice field and I have no preference what's set as default, I can if that makes it work.

ice1234
Frequent Visitor

Hi all, maybe not the exact same topic but similar.. how would you implement this if you would want the default value to be the last thing the user selected? 🙂 I have an Expense app linked to Sharepoint and to make things easier for the user I would want the default value on a dropdown to be the same as the last item they submitted. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,305)