web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to set a default v...
Power Apps
Answered

How to set a default value in Options Set to CDS?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everybody!

 

Just got a short question about setting a default value in an Options Set column in a CDS.

You know if you create a field in CDS, you can choose the Data type and I've chosen Option Set - yes and no (boolean) and set the default value to none in the field option.

 

But how to set a default value by adding a record into the CDS? I've tried ColumnName: Blank() - It's being accepted but it's not working the way I like. I'm afraid the default value is set to "Yes" or "No". But I need an empty value in the column.

 

How to achieve this?

 

Thanks so much for helping!

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

    If use a two value option set, I don't believe that you can do what you want.  However, if you use a regular option set, and set it to no default value and Required is set to optional, if the user doesn't make a choice in that field, it will be entered as a blank. In the edit form in the app, you can modify the Display name in the card for that field to 

     

    Parent.DisplayName & " (Optional)"

     

    So that the user knows that a choice is not required.  In the combobox in the card there is a property called no selection text.  You can put a message in there like "none".

    Annotation 2020-06-07 100855.jpg

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey @Drrickryp,

     

    appreciate your support. Thanks so much.

     

    However, if you use a regular option set, and set it to no default value and Required is set to optional, if the user doesn't make a choice in that field, it will be entered as a blank.

    Yes, I've tried this as well. Before writing this post, all my code behaves differently and I thought this might not be the solution I'm able to choose.

     

    After you've written your reply, I've tried it again and it worked.

     

    Thanks so much for helping!

     





Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard