cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Setting the default value for a Sharepoint Choice field

 

I have a PowerApp form connected to a SP list. I want to force the value of a choice field on the form. The defualt value will be a valid choice on the SP list. 

1 ACCEPTED SOLUTION

Accepted Solutions

Having went through this trouble myself, I reccomend setting a variable to the default that you want, and then setting the combobox's default to that variable.

 

Like, OnStart: Set(var_default,"myvalue")

Then set the combo box default to {Value: var_default} or something

View solution in original post

8 REPLIES 8
Resolver II
Resolver II

Hi,

To set the  default value for a dropdown, use the default value in advance. See pic below. In this case I set it to 22750

 

Please mark as a solution if works. (:

Capture.PNG

 

This did not work for me. I attached an error message that it gave me when I tried to write "Template Update" as the default. I am not sure how to past pictures in this message box so I has to attach. 

 

Having went through this trouble myself, I reccomend setting a variable to the default that you want, and then setting the combobox's default to that variable.

 

Like, OnStart: Set(var_default,"myvalue")

Then set the combo box default to {Value: var_default} or something

View solution in original post

I like this idea but where do I find the OnStart action? I do not see one on the form or screen level? Could I do OnVisible on the screen the form is on? 

is Tmplate Update in your item source? Try in quotes, "Template Update"

Yes you can do it onvisible or whenever.

Do you know a way to lock the field so the user of the form cannot change it. I have it selected when they enter the form but they can change it. At first I set the field visible = false but then it gives an error when the user submites the form. I need to either lock the field with my default value or make it invisible. 

You can set its displaymode to disabled

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,419)