Make multiple choice field's option read-only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2025 08:43 AM
Hi All,
I have a 'Multiple Choice' field called request type, i want to make 'Change/Move' option ready only on form load.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2025 08:55 AM
Hi @Ankita9793 ,
The setReadOnly() function works at the field level, it doesn’t allow selective read only of individual choice list values.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2025 09:03 AM
Try using Onchange script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) return;
var fieldName = 'your field name';
var blockedValue = 'Your choice value ';
if (newValue === blockedValue) {
g_form.showFieldMsg(fieldName, '"' + blockedValue + '" cannot be selected.', 'error');
g_form.setValue(fieldName, oldValue);
}
}
If you want the Your option to look unselectable while still being visible, you’d need to override the UI via DOM manipulation using onload
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2025 09:51 AM
Hello @Ankita9793 ,
CC: @kaushal_snow,
As per my understanding, it is not possible to make a specific choice read-only for a variable with the data type Multiple Choice in ServiceNow.
However, we can implement a workaround to achieve a similar result.
Scenario:
We have a Multiple Choice variable named "test1", with the following choices:
"one"
"two"
We want to prevent users from selecting the choice "two", which is essentially what we were trying to achieve by making it read-only.
Solution:
We can write an onChange Catalog Client Script. When the user selects the option "two", the script will:
Display a alert message: "Option 2 is not selectable."
Clear the selected value from the field
Script used :
This approach doesn’t make the option read-only, but it effectively prevents the user from selecting it.
Screenshots are attached for better understanding.
If this solution was helpful, please mark it as helpful and complete the thread ✅
Shashank Jain