- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 08:00 AM
Hi,
I am using an oChange client script to add or remove options to a choice list field.
The original choices have hints on attached them when you hover over them but if these options get removed and then added back using the g_form.addOption() method the hint does not come back with the option.
Is there a solution for this?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 09:12 AM
Okay. I don't see any OOB way to achieve this. The only way would be to do DOM manipulation which is not recommended. (and I am not good in DOM manipulation 😛 )
If your choice field is dependent on other field value then you can try dependent choice configuration.
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 09:30 AM
A hint is added to the option tag using the title attribute. So you should be able to take the small sample of code and use it to add a title to the option you just added.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 08:54 AM
Hi,
Please check if below link resolve your issue, had shared solution for similar issue.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 09:00 AM
Hi,
Thanks for link for the workaround but I'm trying to keep the ability to hover over the choice to get the hint to display.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 09:12 AM
Okay. I don't see any OOB way to achieve this. The only way would be to do DOM manipulation which is not recommended. (and I am not good in DOM manipulation 😛 )
If your choice field is dependent on other field value then you can try dependent choice configuration.
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 04:41 PM
As others have replied, the only way now is to use DOM manipulation as described with example in the following thread. DOM manipulation is not recommended because it may not works when ServiceNow is versioned up.