Activity Stream @Mention user filter.

User667175
Giga Expert

Hi all,

With regrads to the activity stream @mentions notification. Is there a way to either: 

  1. Lock it down to internal users only. (i've managed to do this so a notification isn't sent to an external client but they're still selecteable in the user filter. See below image). 
  2. Filter the selectable users in the @mention picklist. 
  3. Identify based on the company in the @mention picklist, this way we can differentiate which user to tag. 

The current issue I'm facing is we have an internal user and external user with eactly the same name. e.g. Joe Bloggs

When you @Joe Bloggs there isn't a distinctive way of telling the two users apart in the filter. 

find_real_file.png

Any help is greatly appreciated.

Thanks,

Mike

 

1 ACCEPTED SOLUTION

Waleska
Kilo Guru

If you are looking to change the display of the results (adding Company or Department) you will navigate need to edit the Dictionary entry for "Name" under the sys_user table. Please Note: This will change the display for more than just the mentions results. It's using (aka: Name that appears in comments, name that appears at top right of logged in user, etc)

It is currently scripted to display First name + Last Name. You can add additional fields there.

Sample from my demo instance that displays as Abel Tuter (Product Management): 

if (current.first_name.nil() && current.last_name.nil() && !current.name.nil()) {
  var names = current.name.toString().split(" ");
  if (names.length > 1) {
    current.first_name = names[0];
    names.shift();
    current.last_name = names.join(" ");
  } else 
    current.last_name = names[0];
}  

if(current.first_name.nil()) { 
    current.last_name + ' (' + current.department.getDisplayValue() + ')'; 
  } else { 
    current.first_name + ' ' + current.last_name + ' (' + current.department.getDisplayValue() + ')';
  }

 

Please Note, I didn't add a check to ensure the new display field (in this example "Department") is not empty. You may want to add this so you don't end up with First Last ()

View solution in original post

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

Waleska
Kilo Guru

If you are looking to change the display of the results (adding Company or Department) you will navigate need to edit the Dictionary entry for "Name" under the sys_user table. Please Note: This will change the display for more than just the mentions results. It's using (aka: Name that appears in comments, name that appears at top right of logged in user, etc)

It is currently scripted to display First name + Last Name. You can add additional fields there.

Sample from my demo instance that displays as Abel Tuter (Product Management): 

if (current.first_name.nil() && current.last_name.nil() && !current.name.nil()) {
  var names = current.name.toString().split(" ");
  if (names.length > 1) {
    current.first_name = names[0];
    names.shift();
    current.last_name = names.join(" ");
  } else 
    current.last_name = names[0];
}  

if(current.first_name.nil()) { 
    current.last_name + ' (' + current.department.getDisplayValue() + ')'; 
  } else { 
    current.first_name + ' ' + current.last_name + ' (' + current.department.getDisplayValue() + ')';
  }

 

Please Note, I didn't add a check to ensure the new display field (in this example "Department") is not empty. You may want to add this so you don't end up with First Last ()

Very helpful!