- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I have a requirement in incident form ->
Create a new button 'show suggestion'
whenever a person raises an incident, this button will be visible and when a user clicks on it there will be similar past incidents will be shown to the user.
How to accomplish this as I don't want that old incident short description exactly matches new incident short description
I want them to be similar, and based on similarity it will give results.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @prakharmahe ,
If your requirement is to show similar incidents rather than incidents with an exact Short Description match, a standard GlideRecord query (= or CONTAINS) will not be sufficient.
You have a few architectural options depending on how intelligent you want the matching to be, ranging from basic keyword searches to Machine Learning.
Option 1: Zing Text Search (Custom Client-Side Button)
To fulfill your exact requirement of a custom button, the easiest way to display results without building a complex custom UI modal is a Client-Side UI Action. This leverages ServiceNow's native Zing text search operator (IR_AND_OR_QUERY).
Note: This is a keyword-based relevance search, not true semantic similarity. It will look for shared words and rank them, but it does not understand the underlying meaning of the text.
Create a UI Action called Show Suggestions.
Check the Client checkbox.
Set the Onclick function to showSuggestions().
Use this script:
function showSuggestions() {
var shortDesc = g_form.getValue('short_description');
if (!shortDesc) {
g_form.addErrorMessage('Please enter a Short description to find suggestions.');
return;
}
// Use the native Zing text search operator to find matching keywords
var query = 'short_descriptionIR_AND_OR_QUERY' + shortDesc;
// Open a new window/tab with the filtered list of incidents
var url = '/incident_list.do?sysparm_query=' + encodeURIComponent(query);
window.open(url, '_blank');
}Option 2: Predictive Intelligence (Similarity Framework) — Recommended for True Similarity
If your instance is licensed for ITSM Professional, this is the best-practice approach. ServiceNow has a built-in Similarity Framework that uses Natural Language Processing (NLP) to understand the meaning of words rather than just matching text.
Example:
Current: "Unable to connect to corporate VPN"
Similar: "VPN connection fails when working remotely"
Even though the text is different, the ML model can identify them as related.
Option 3: Contextual Search (No-Code Alternative)
Before building custom UI Actions, consider using Contextual Search.
Instead of a button, it dynamically displays related search results as the user types.
Configuration Note: While Contextual Search searches Knowledge Articles and Catalog Items out of the box, you will need to review Contextual Search > Table Configuration and configure the appropriate search sources if you want similar Incidents to appear.
Recommended Approach
If your organization has Predictive Intelligence / ITSM Pro, use the Similarity Framework for true semantic matching.
If you want a configuration-based solution, consider Contextual Search.
If the business specifically requires a custom button, use the Client-Side UI Action + Zing Search approach as a practical keyword-based solution.
Hope this helps!
Please mark this answer as Helpful if it resolves your question. 🙂
Thanks,
Yogesh Bhatt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @prakharmahe ,
If your requirement is to show similar incidents rather than incidents with an exact Short Description match, a standard GlideRecord query (= or CONTAINS) will not be sufficient.
You have a few architectural options depending on how intelligent you want the matching to be, ranging from basic keyword searches to Machine Learning.
Option 1: Zing Text Search (Custom Client-Side Button)
To fulfill your exact requirement of a custom button, the easiest way to display results without building a complex custom UI modal is a Client-Side UI Action. This leverages ServiceNow's native Zing text search operator (IR_AND_OR_QUERY).
Note: This is a keyword-based relevance search, not true semantic similarity. It will look for shared words and rank them, but it does not understand the underlying meaning of the text.
Create a UI Action called Show Suggestions.
Check the Client checkbox.
Set the Onclick function to showSuggestions().
Use this script:
function showSuggestions() {
var shortDesc = g_form.getValue('short_description');
if (!shortDesc) {
g_form.addErrorMessage('Please enter a Short description to find suggestions.');
return;
}
// Use the native Zing text search operator to find matching keywords
var query = 'short_descriptionIR_AND_OR_QUERY' + shortDesc;
// Open a new window/tab with the filtered list of incidents
var url = '/incident_list.do?sysparm_query=' + encodeURIComponent(query);
window.open(url, '_blank');
}Option 2: Predictive Intelligence (Similarity Framework) — Recommended for True Similarity
If your instance is licensed for ITSM Professional, this is the best-practice approach. ServiceNow has a built-in Similarity Framework that uses Natural Language Processing (NLP) to understand the meaning of words rather than just matching text.
Example:
Current: "Unable to connect to corporate VPN"
Similar: "VPN connection fails when working remotely"
Even though the text is different, the ML model can identify them as related.
Option 3: Contextual Search (No-Code Alternative)
Before building custom UI Actions, consider using Contextual Search.
Instead of a button, it dynamically displays related search results as the user types.
Configuration Note: While Contextual Search searches Knowledge Articles and Catalog Items out of the box, you will need to review Contextual Search > Table Configuration and configure the appropriate search sources if you want similar Incidents to appear.
Recommended Approach
If your organization has Predictive Intelligence / ITSM Pro, use the Similarity Framework for true semantic matching.
If you want a configuration-based solution, consider Contextual Search.
If the business specifically requires a custom button, use the Client-Side UI Action + Zing Search approach as a practical keyword-based solution.
Hope this helps!
Please mark this answer as Helpful if it resolves your question. 🙂
Thanks,
Yogesh Bhatt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @prakharmahe
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @prakharmahe
@could it be that you should ask for a problem statement instead of a solution description? Basically, what problem is it that the requester is trying to solve?
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18 hours ago
Suppose someone raises an incident which is new to you but in past there can be similar incidents so you can take reference of those incidents and solve the issue at preset.