- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2025 09:46 AM
I have a variable set which has a drop down variable with 3 drop down choices. This variable set is used in many catalog items. For a particular catalog item, I want to rename the 3 drop down choice labels. I want to use same choices but just want to rename the labels.
Please kindly guide me if this is possible and how can I achieve it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2025 12:21 AM
Hello @Shruti Chelimel ,
This is not possible, to achieve this create new Variable set and give the desired name to the variable and use the same in the CITEM.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2025 10:55 PM
Yes, you can rename the labels of the dropdown choices for a particular catalog item without affecting other catalog items that use the same variable set.
1. Use a Client Script on the Specific Catalog Item
- Create a New Client Script:
- UI Type: Catalog Client Script
- Type: onLoad
- Catalog Item: (Select the specific catalog item)
Script :
function onLoad() {
// Get the dropdown field (replace 'dropdown_variable_name' with actual variable name)
var dropdown = g_form.getField('dropdown_variable_name');
if (dropdown) {
// Rename choices
g_form.removeOption('dropdown_variable_name', 'Choice1Value');
g_form.removeOption('dropdown_variable_name', 'Choice2Value');
g_form.removeOption('dropdown_variable_name', 'Choice3Value');
g_form.addOption('dropdown_variable_name', 'Choice1Value', 'New Label 1');
g_form.addOption('dropdown_variable_name', 'Choice2Value', 'New Label 2');
g_form.addOption('dropdown_variable_name', 'Choice3Value', 'New Label 3');
}
}
2.
Replace placeholders in the script:
- dropdown_variable_name → Replace with the actual name of your dropdown variable.
- Choice1Value, Choice2Value, Choice3Value → Replace with actual values stored in the choice field.
- New Label 1, New Label 2, New Label 3 → Replace with the desired new labels.
Save and Test it .
Mark Helpful if you got solution for your issue.
Best Regards,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2025 05:34 AM
Hello,
Thanks for you response.
I do not want to remove existing options and add new options, instead i want to rename the existing choice option labels. This change in drop down choices should be updated on portal catalog form and also on the requested item/sc_task record once the item is submitted.
Please let me know if there is anyway to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2025 12:21 AM
Hello @Shruti Chelimel ,
This is not possible, to achieve this create new Variable set and give the desired name to the variable and use the same in the CITEM.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2025 12:30 AM
not possible.
2 ways
1) create a new variable of type drop down with your choices and then remove that earlier variable set
OR
2) try to see if you can change the choice label using DOM manipulation. I won't recommend DOM manipulation.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader