- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 12:02 PM
Hi, everyone. I had a question about mentions. For work notes, is there a way to filter the names to only display users who have the ITIL role? Some of the users with the ITIL role sometimes forget that work note mentions only work for ITIL users and non-ITIL users will not get the mention emails. I did a lot of searching, but could not find anything. Thank you.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 12:09 PM
You need to configure On Before Query BR on Table "sys_user"
Condition: gs.getSession().isInteractive() && gs.action != ''
Script:
(function executeRule(current, previous /*null when async*/) {
try
{
if(gs.action.getGlideURI() != '')
{
if(gs.action.getGlideURI().getMap()!= '')
{
if(gs.action.getGlideURI().toString().startsWith('api/now/form/mention/record/'))
current.addEncodedQuery('roles=itil');
current.addActiveQuery();
}
}
}
catch(errObj)
{
gs.error('Global_Set_Filter_Mention-'+errObj);
}
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 12:04 PM
Hi,
No it is hard to do this. It is inbuilt functionality so might not be possible.
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 12:09 PM
You need to configure On Before Query BR on Table "sys_user"
Condition: gs.getSession().isInteractive() && gs.action != ''
Script:
(function executeRule(current, previous /*null when async*/) {
try
{
if(gs.action.getGlideURI() != '')
{
if(gs.action.getGlideURI().getMap()!= '')
{
if(gs.action.getGlideURI().toString().startsWith('api/now/form/mention/record/'))
current.addEncodedQuery('roles=itil');
current.addActiveQuery();
}
}
}
catch(errObj)
{
gs.error('Global_Set_Filter_Mention-'+errObj);
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 11:46 PM
Thank you very much. Before I try to implement, would this only affect mentions in Work Notes or both Work Notes and Comments?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2020 12:25 AM
Hi,
For above it is not specific to Worknotes or Comments i.e. anywhere you try to use @Mention feature it will show only record of Users with ITIL role because the rule above will look for URL & if it has /mention keyword it will execute regardless of the field that you are on.