Restrict triggering of email notification to when no contextual results found on the related HR case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2026 05:00 AM
Hi Team,
Can you please guide on establishing this scenario.
Currently we are triggering the notification to requester with related contextual search results using table configurations and we are using email script : cxs_emailsearchresults (OOB) in the email body.
Now I need to restrict triggering of email notification to requester when no contextual results found on the related HR case.
Thanks,
Ram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2026 05:06 AM
may be try using advanced notification condition and see if any search results were there or not
If not then set answer = false; in script section
answer = true;
var searchRequest = cxs_App.getActions("cxs_TableActions", current).getEmailSearchRequest(email_action);
if (!searchRequest || searchRequest == null || !searchRequest.query.freetext || !searchRequest.meta.get("runAsUser"))
answer = false;
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2026 06:01 AM
Hi @Ankur Bawiskar ,
Thanks for the reply, I have tried this it's showing an error as "cxs_App undefined, may be missing a global qualifier" I tried by giving sn_hr_core.cxs_App but it's still the same error.
