- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 05:34 PM
I have a doubt to do this, in my cenario i need for example:
If the option in field Movimentação is Garantia, the choice "Desenvolvimento" need to be invisible..
I was trying with g_form.removeOption(); but this don´t work for field like Multiple Choice.
any help is welcome, thank you so much!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 06:30 AM
Hi @RenomarioC ,
you create the onChange client script on the multiple choice type variable
it's the basic script (enhance it as per your requirement)
here when a user try to select value tset3 the client script clears it and shows the message
add you logic in the (if condition when a value can be selected and when it should not be)
I don't know you exact requirement but you can enhance it with this idea
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 06:30 AM
Hi @RenomarioC ,
you create the onChange client script on the multiple choice type variable
it's the basic script (enhance it as per your requirement)
here when a user try to select value tset3 the client script clears it and shows the message
add you logic in the (if condition when a value can be selected and when it should not be)
I don't know you exact requirement but you can enhance it with this idea
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2025 05:38 AM
Thank you so much for your help, i did and put my criteria and its work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 07:16 PM
Please try
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.clearValue('request_type');
g_form.setValue ('request_type', 'test2'); //you need to pass variable name and choice value
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 07:28 PM
Sorry, It seems clearValue not working for multiple choice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 07:45 PM
Please inform customer to use select box variable as g_form.remove and addoption won't work for multiple choice
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