- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 02:58 AM
Hi everyone,
in the @mention function in journal fields, the matching User Names pop up as choices. However, there is no way to distinguish between who is who for users with identical names:
Is it possible to add the User ID in the results list, so we can see who is who? Something like this:
Or is there some other way to determine who is who?
I would have expected this to be a quite common requirement but can't find any post or info about it.
Thanks in advance -Parker
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 04:39 AM
It can be done:
Update the sys_user name dictionary item. The calculated item can do the same checks for @mention and display a different calculated value there.
Example...
// At the end of the calculated value script, add the below
if (gs.getSession().isInteractive()) { // only do for interactive sessions
if (gs.action.getGlideURI() != "") {
if (gs.action.getGlideURI().getMap() != '') {
if (gs.action.getGlideURI().toString().startsWith('api/now/form/mention/record/')) { // @ mention is being used
current.user_name; // return user_id field - change this combo to be anything you would like
}
}
}
}
If helpful please mark as Helpful/Correct
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 12:40 PM - edited 05-21-2024 12:41 PM
Also worked for me as well! 😁
Thank you very much @Paul Curwen!
Would you know if it's possible to put some information on a second line like the original ask?
Something like...
John Smith (smij)
Developer
John Smith (smjo)
Assitant Director
I was able to add the "User ID" in the parenthesis and other attributes of the sys_user record but would like to display the "Title" under the name.
Any idea if that could be done?
Thank you for your help!
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 08:32 AM
How to do it in Agent workspace? i want to same information like department, User ID in @ mentions in worknotes.
Is it possible ?
Thanks in Advance