How to set up an email to appear on the @mention screen

BoHyun Jung
Mega Sage

 

I can't distinguish the same name because only the name is coming out. I want to modify it so that I can check the email as well.

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Sorry, I don't get your point.

James Chun
Kilo Patron

Hi @BoHyun Jung,

 

Have a look at this old thread - https://www.servicenow.com/community/itsm-forum/how-to-add-username-or-email-address-on-mention-func...

 

As per the thread, I am not sure if it's feasible in the native UI but it does show the email address in the Workspace.

JamesChun_0-1715576256938.png

 

Another option is adding a photo/avatar on the user records.

 

Cheers

Mary S
Mega Sage

Tried this in my PDI, which is working:  How can I display other user attributes when doing... - Page 2 - ServiceNow Community

I haven't moved it to business instances as I want to make sure it doesn't affect anything else or if there is another way to do this.

 

Add script to sys_user name in the dictionary to display first name and user name: 

MaryS_0-1716921921274.png

 

  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.first_name + " " + current.user_name; // return user_id field - change this combo to be anything you would like
      }
    }
  }
}