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
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

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)

 

Highlighted
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.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 279 members 3,979 guests
Recent signins:
Please welcome our newest community members: