Solved

Checkbox - Default Value

  • 13 May 2021
  • 2 replies
  • 472 views

Userlevel 4
Badge +9

I have a custom field which is a checkbox with the field type as Boolean and Enumeration as Yes and No

The default value is set to NO in the field properties.

But for some reason the value in the dB is Empty instead of NO

The same problem exists for all checkbox

 

Is there a system wide setting for this ?

 

 

 

icon

Best answer by EntNadeeL 13 May 2021, 12:22

View original

This topic has been closed for comments

2 replies

Userlevel 5
Badge +9

Hi @geminirajesh ,

Unfortunately, it is the default value that you want for this field when creating a new record. it does not persist the default value in database.

you will have to pick a value and save the record to persist it.

You could write a script for this. But I am not aware about a system wide option. 

 

Userlevel 5
Badge +11

The default value of the checkbox should work fine for new records, otherwise you need to review the custom field set up again.

 

For existing records, the checkbox value will most likely be NULL, I don’t believe the system will retrospectively update all existing records for you.  My suggestion would be to utilise data migration or a suitable PLSQL script to correct the existing records.

 

Not sure if Find & Replace would work as well, you have to essentially check and then uncheck the checkbox.