Single checkbox can't be default to 0?

We have a single checkbox on the content editor. When it is checked, the value 1. When it is unchecked afterwards, the value became “NULL”. We need to have value 0 for this “unchecked” scenario, and tried to set default value for the field to 0, but it didn’t work, and it still saved “NULL” into the database.

We tried some Transform on the field too, but no luck so far.

Any suggestions/clarifications?

Thanks,
-Laura

Hi Laura

This is true, it’s either 1 (or whatever value you want) and NULL.

Can you explain why the non check state has to be 0?

Cheers
James

Thank you for the confirmation, James. And sorry about the late reply - I was busy on a release that just went live.
We have another application that needs the value to run some logic, and the upgrade migration program has insert 0 for the existing data so we need to be consistent.

-Laura

try changing the data type to text (string) - that is if your other application looks up Rx db directly for that value, this way Rhythmyx will hold the value of 0, but you will have to do much more on the application end to convert it back to int.
Another way, if you publish to the DB where this data needed by other application - just do a condition on that field and return a value of 0 for your null