How to make a true/false (boolean) field mandatory?

chr_kluge
ServiceNow Employee
ServiceNow Employee

Hi everyone

 

Did some of you face the same problem?

In the change_request I would like to make "production_system" mandatory. As it is a True/False field and I don't want to change the type I tried to configured a choice list with none. But it isn't working either for the choice values "0" and "1" or for the values "true" and "false.

How can I achieve this?

 

Thanks a lot

Christina

10 REPLIES 10

Harish Murikina
Tera Guru

Hence it is a check box so its having two options either true if user select the box or false if user not selects the checkbox.



Which meand field having either true or false. So field holding some value. If you would like to ask user to select check box. Then get the value if check box false ask user to check the box.



Regards,


Harish.


Kalaiarasan Pus
Giga Sage

I don't think logically that is possible (Haven't tried it though) .. Because empty value means the value is false and if it checked , it means true ... I suggest you add a choice field if you want user to actually fill it ..


craig_granier
Giga Contributor

I would probably take the true/false field off the form and add a string field w/ 3 choices 'Yes/No/None'.     You can then use standard validation mechanism on that field.     If needed, you can add a business rule set it's value of the true/false field on insert & updates.


This is the way to go.   A checkbox always has a value, either true or false, so setting it to be mandatory makes no sense.



I always use a lookup with "-- Please Select --", "Yes" and "No" when I need to force the user to select one.