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

Set default value for a drop down in a new form

Hi, 

I am trying to set a default value to a status field in my form. The dropdown has three options - Open, WIP, Closed in the sharepoint list. 

When the form is opened in the New mode, I want the default value to be Open. 

I am unable to set this. Please advise. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
AJ13
Level: Powered On

Re: Set default value for a drop down in a new form

That didn't work Sienna. 

The solution posted at  https://powerusers.microsoft.com/t5/Using-PowerApps/Ability-to-set-a-default-value-for-a-Sharepoint-... worked for me.

 

 

If(SharePointForm1.Mode = New, {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:0,
  Value:"Orange"}, 
ThisItem.TestChoice)

 

5 REPLIES 5
Sienna
Level 10

Re: Set default value for a drop down in a new form

What is the datasourcee for dropdown?
AJ13
Level: Powered On

Re: Set default value for a drop down in a new form

A sharepoint List. A choice column maps to the drop down. The choice column has three options - Open, WIP and Closed.

Sienna
Level 10

Re: Set default value for a drop down in a new form

You can use 

 

First(YourSharepointDatabaseName) 

or

Last(YourSharepointDatabaseName)

or

First(Filter(YourSharepointDatabaseName,ColumnName="Open"))

 

in your default property of your dropdown item

Highlighted
AJ13
Level: Powered On

Re: Set default value for a drop down in a new form

That didn't work Sienna. 

The solution posted at  https://powerusers.microsoft.com/t5/Using-PowerApps/Ability-to-set-a-default-value-for-a-Sharepoint-... worked for me.

 

 

If(SharePointForm1.Mode = New, {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:0,
  Value:"Orange"}, 
ThisItem.TestChoice)

 

Community Support Team
Community Support Team

Re: Set default value for a drop down in a new form

Hi @AJ13,

 

Thanks for the updates.

If convenient, could you please accept your sharing posts as the solution, so that others could find the proper solution more quickly?

 

Regards,

Michael

 

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