- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 06:27 AM
Hi,
I was trying to update the icon info based on state changes:
For Ex: In the description field i wanted to show help icon with some text 'abc' when state is 'New'
And For the same description field i wanted to show help icon with some text 'xyz' when state is 'Assess'
Here I am facing the issue that i am not able to clear the first help icon text when the state is changed its showing both, Please refer the attachment.
Any Suggestions would helpful
Thank You!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 07:51 AM
just after your onChange triggers remove the decoration so that the new icon is shown with proper text
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.removeDecoration('description', 'icon-view', 'Your Title here');
// your logic here
}
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 06:36 AM
how are you showing that icon? share the script and script config screenshots.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 06:54 AM
I am using onLoad CS and one onChange of State
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 07:51 AM
just after your onChange triggers remove the decoration so that the new icon is shown with proper text
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.removeDecoration('description', 'icon-view', 'Your Title here');
// your logic here
}
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 11:09 PM
Hi Ankur,
It worked for me, Thank you for the quick response.
