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.
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:
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
@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.
This worked for me in the DefaultSelectedItems properties of a Combo Box. Thank you!
The answer here will work but is more complex than necessary. The linked blog post does work correctly. Make sure you have your syntax right including the V in value uppercase:
If( EditForm1.Mode = FormMode.New, { Value: "Morning" }, Parent.Default)
User | Count |
---|---|
257 | |
107 | |
90 | |
51 | |
44 |