cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zmansuri
Community Champion
Community Champion

Set default value in Combobox

q29.jpg

There are only two values. Yes and No. I want to set default value as "No". When i try "Default" property or "DefaultSelected" property. It works but, then it doesn't update the value.

For ex. IF i set No as default. And someone changes to YES and save the form. value will still be No

5 REPLIES 5
WarrenBelz
Super User III
Super User III

Hi @zmansuri ,

What type of field is Contact and what is the Update of the data card?

CNT
Community Champion
Community Champion

@zmansuri I think u'll want the default value only in New Mode. So, set the default of the combo to,

If(yourFormName.Mode=FormMode.New, put here whatever you have now in the default property

Bideyy
Frequent Visitor

Hello Zmansuri.

 

What choice type did you attach your contract to? is it system default yes/NO choice types or custom.

if its default, you might as well, use a custom type of choice, then try it again. it should work.

faced this same thing a while back, i had to use my own custom made choice type to get it done.

 

You can also set your default value from the datasource as well, have you tried this??

zmansuri
Community Champion
Community Champion

It's sharepoint choice filed containing 2 custom values. Yes and No.

Update property: cmbContractFlag.Selected

CNT
Community Champion
Community Champion

@zmansuri The Update property seems to be fine. Are you sure its not saving properly or is it just showing you the default value "No" after saving, because "No" has been set as the default of the ComboBox?

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,211)