Is it possible to set a Checkbox variable to null by default instead of False?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2020 02:09 PM
Hello,
I have 4 Checkbox variables on a catalog item that are hidden via UI Policies when conditions are met. I'm having an issue where these 4 variables are always shown on the Ticket Fields widget on the portal for every user, even if the variables are hidden on the cat item to the user. SNOW Support has told me that this is because the checkbox variables have a value (of False) set by default and any variable that has a value entered is displayed on the Ticket Fields widget.
Is there a way around this? Is it possible to set the default value to null maybe?
Thanks!
Mike
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2020 03:12 PM
The value of a checkbox is true or false, 1 or 0, there is no null.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2020 03:21 PM
Hi Mike,
Unfortunately not! It's a true/false type means it's a Boolean it will return 0 or 1 only and you can not define anything more than this. A checkbox will be either checked or unchecked apart from that you can not have 3rd option.
However If my understanding is correct then you want the UI Policy to be applied on the backend ticket also, then you can check the checkbox "Applies on Catalog Tasks" and "Applies on Requested Items" in when to apply section available in UI Policy.
Kindly mark my answer as Correct and Helpful based on the Impact.
Regards,
Alok

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2020 10:29 PM
Hi there,
Yes and no.
- No: When working with Checkbox Variable on a Catalog Item, it will always be true or false.
- Yes: On submitted Catalog Items, you could - scripted - empty the Variable contents of that Checkbox (which is stored in sc_item_option table for Catalog Items, question_answer for Record Producers, sc_multi_row_question_answer for Multi-Row Variable Set).
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2020 11:05 PM
Hi there,
Did this solve your question? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field