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

Dropdown default value in PowerApps

I have created an app using SharePoint list as a source.

In  SharePoint list, i have set some default values like date is set to today's date, drop down has some default value.

When i customize this form into app, default value doesn't appear.

Can you please advise how to display default as showing this in SharePoint list ?

 

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Dropdown default value in PowerApps

Default values in the SharePoint list don't carry forward to the field controls that are created in PowerApps. for example if I had a Start Date field I wanted to default to the current date I could add this formula to the Default property of the datacard containing the "Start Date".

 

If(
    SharePointForm1.Mode = FormMode.New,
    Now(),
    ThisItem.'Start Date'
)

You will need to tweak this formula based on the name of your column name and field type.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Dropdown default value in PowerApps

HI @satishpandey ,

Could you please share a bit more about your scenario?

Do you want to set a Default value for the Date field and Dropdown field in the Edit form of your app?

 

Currently, the Default property of the fields in a SP list would not be applied to a canvas app. If you would like the Default value of the fields you set within your SP list could be displayed well in your canvas app or custom form, I afraid that there is no way to achieve your needs in PowerApps currently.

 

As an alternative solution, you could set the Default value for corresponding fields in the Edit form of your app directly. I have made a test on my side, please take a try with the following workaround:8.JPG

 

9.JPG

Set the DefaultDate property of the DatePicker control within the Due Date Data card to following:

If(SharePointForm1.Mode = FormMode.New, Now(), Parent.Default)

Set the DefaultSelectedItems property of the Combo Box within the Status Data card to following:

If(
SharePointForm1.Mode = FormMode.New,
{
Value: "Pending"
},
Parent.Default
)

Note: The Status column is a Choice type column on my SP List.

 

Please also check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Super User
Super User

Re: Dropdown default value in PowerApps

Default values in the SharePoint list don't carry forward to the field controls that are created in PowerApps. for example if I had a Start Date field I wanted to default to the current date I could add this formula to the Default property of the datacard containing the "Start Date".

 

If(
    SharePointForm1.Mode = FormMode.New,
    Now(),
    ThisItem.'Start Date'
)

You will need to tweak this formula based on the name of your column name and field type.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Dropdown default value in PowerApps

HI @satishpandey ,

Could you please share a bit more about your scenario?

Do you want to set a Default value for the Date field and Dropdown field in the Edit form of your app?

 

Currently, the Default property of the fields in a SP list would not be applied to a canvas app. If you would like the Default value of the fields you set within your SP list could be displayed well in your canvas app or custom form, I afraid that there is no way to achieve your needs in PowerApps currently.

 

As an alternative solution, you could set the Default value for corresponding fields in the Edit form of your app directly. I have made a test on my side, please take a try with the following workaround:8.JPG

 

9.JPG

Set the DefaultDate property of the DatePicker control within the Due Date Data card to following:

If(SharePointForm1.Mode = FormMode.New, Now(), Parent.Default)

Set the DefaultSelectedItems property of the Combo Box within the Status Data card to following:

If(
SharePointForm1.Mode = FormMode.New,
{
Value: "Pending"
},
Parent.Default
)

Note: The Status column is a Choice type column on my SP List.

 

Please also check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
satishpandey
Level: Powered On

Re: Dropdown default value in PowerApps

Thanks so much for your help.

I was able to default the date and drop down by using the same syntex you have provided.

Highlighted
satishpandey
Level: Powered On

Re: Dropdown default value in PowerApps

Thanks Jeff.

I just used this formula in the default property and it worked perfectly fine.


If(SharePointForm1.Mode = FormMode.New,

Now(),

Parent.Default)

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: 447 members 5,266 guests
Please welcome our newest community members: