How to have no radio button selected on catalog item variable on form load?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 01:09 AM
I have a mandatory variable of type Lookup Multiple Choice (ie create radio buttons using data from a table) on a record producer.
By default, the first radio button is selected on form load.
Is it possible to have no radio button selected on form load?
I have tried setting ‘Do not select the first choice’ option to true but this does not appear to work and I want to avoid adding a —None— radio button using ‘Include none’ in Type Specifications.
- Labels:
-
Request Management
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 01:16 AM
try with onload catalog client script
g_form.clearValue('your variable')
Please Mark Correct And Helpful. Thanks!
Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 01:20 AM
Hi,
Try something like this.?
var var_ctrl = g_form.getControl('variable_name');
var_ctrl.value = '';
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 01:30 AM
thanks Musab. Forgot to mention this is required on Service Portal and ServiceNow documentation indicate getControl() is not available in mobile scripts or Service Portal scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 01:36 AM
thanks Martin. I tried that however that appear to clear the sort order of the radio buttons. And if I click on the first radio button it sorts the radio button by name. For example, if the items in table are Yes (10), No (20) and Maybe (30), the radio button will appear as Yes, No and Maybe on load. After the clearValue, if I select Yes, the radio buttons will re-sort and appear as Maybe, No and Yes, so not ideal.