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.
Solved! Go to Solution.
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.
//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.
Then, the drop down will display choice1 as the default value instead of blank value.
Best regards,
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.
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.
//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.
Then, the drop down will display choice1 as the default value instead of blank value.
Best regards,
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.
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.
User | Count |
---|---|
260 | |
109 | |
93 | |
56 | |
41 |