Scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2025 06:37 AM
On the incident form, category should be filled, if a word is present in the short description. Kindly help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2025 06:43 AM
sorry your requirement is not clear.
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
‎07-18-2025 10:16 AM
Alright, thank you so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2025 06:44 AM
Hi @khuranahima ,
if I understand this correct
if short description contains particular keyword the category should be filled automatically
you can crate a onchange client script on short description field on the incident table
script
I have taken database as a key word an choice
replace key word with your key work
and choice with your choice backend value
I have added comments next to the lines where you have to update
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var keyWord = 'database' ; //replace database with your keyword
if (newValue.includes()) {
g_form.setValue('category', 'database'); //replace database with your choice
}
}
If My understanding is wrong please share the requirement in detail with some screenshots
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 10:13 AM
Thank you so much.