Are there any Best Practices on when to use a Boolean (checkbox) over a Choice with Yes/No?

Amie Macejkovic
Tera Guru

In the past, I have heard from a couple developers that we should not use use Choice type fields when using them with Yes/No choices and instead use checkboxes.  The reason is that boolean takes up less space in the database.  

Are there any best practices around these field types and when to use them?

1 ACCEPTED SOLUTION

Jim Coyne
Kilo Patron

My main reason for using a "Yes/No" choice field over a checkbox is when I want to force someone to select an answer, i.e. make the field mandatory.  Checkbox fields do not function well under this use case as either state fulfills the mandatory requirement, but a choice list with "Yes", "No" and a null item forces the user to select an answer.

As for "less space in the database", technically yes, but that shouldn't be a concern.  Think of the user experience first.

View solution in original post

4 REPLIES 4

Community Alums
Not applicable

Hi @Amie Macejkovic ,

When you have a definite answer which is in the form of "Yes/No" or "True/False" then go with using Boolean field type and where you have more choices or you want to name the labels , then go with Choices.

Now to understand the best practices of using Choice refer to this article: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0538947

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

Thank you for your reply.

Is it true that the Yes/No choices would take up more storage in the database than the boolean checkbox?

 

 

Jim Coyne
Kilo Patron

My main reason for using a "Yes/No" choice field over a checkbox is when I want to force someone to select an answer, i.e. make the field mandatory.  Checkbox fields do not function well under this use case as either state fulfills the mandatory requirement, but a choice list with "Yes", "No" and a null item forces the user to select an answer.

As for "less space in the database", technically yes, but that shouldn't be a concern.  Think of the user experience first.

Paul Ciarfella
Tera Guru
I prefer Yes/No because any communication to the requester or approver via email or portal form will show the field values as yes/no, whereas a checkbox shows true/false, which is a poor user experience.