cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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)

 

View solution in original post

5 REPLIES 5
Sienna
Resident Rockstar
Resident Rockstar

What is the datasourcee for dropdown?
Anonymous
Not applicable

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

Sienna
Resident Rockstar
Resident Rockstar

You can use 

 

First(YourSharepointDatabaseName) 

or

Last(YourSharepointDatabaseName)

or

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

 

in your default property of your dropdown item

Anonymous
Not applicable

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)

 

Hi @Anonymous,

 

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

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,572)