Small Tricks and Tips : PowerApps – setting default value for the choice column

Hi All,
Today small tip regarding setting default value to SharePoint column in PowerApps form
Background
- By default, SharePoint column default value is not getting in PowerApps forms
- This means for example, even though we set default value for choice column in SharePoint list and we have customized PowerApps form then when we do new form default value does not appear in column or not pre-populate it
- We have a choice column in our list and in form we are showing in Drop-Down Menu – Display choices using: property
- But after customised form in PowerApps, while creating new item default value is not appearing

Workaround / Trick
- Select the respective data card value control for our choice field we need to use the following formula for DefaultSelectedItems property
If(mysharepointform.Mode = FormMode.New, { Value: "MY DEFAULT VALUE" }, Parent.Default)
Here,
mysharepointform - name of the sharepoint form
In our case our form name - SharePointForm1
In above code if our form is in edit mode then we are setting selected value otherwise we are setting default value – “Approved”
Now when we create “New” item default value will appear as

Thanks !!! HAVE A GREAT DAY AHEAD!!!
You must log in to post a comment.