want to add the email id along with the name in the list of the list collector

Community Alums
Not applicable

Hi All, 

Here's the requirement that in the list collector currently populating the name of the users 

we also want to get the email id's along with the name of the users.

find_real_file.png

Any suggestions.

 

 

Regards, 

Vinod.

4 REPLIES 4

Jaspal Singh
Mega Patron
Mega Patron

Reference fields will always populate Display Name for User table it is Name & thus you see Name on selection of user.

It will not be possible (unless heavily customized) to meet your business case.

Alternate suggestion would be to 

1. Enable the search along with mail by adding attributes. Follow link

OR

2. Create a new field that will populate mail address of selected users in the list collector. Obviously this will need a separate logic of its own.

Community Alums
Not applicable

Hi, 

there is script include is there to get the domain users data and that called in the reference qualifier.

by that currently only logged domain user name is reflecting we also want the email id along with the name .

 

var loiDomainUsers = Class.create();
loiDomainUsers.prototype = Object.extendsObject(AbstractAjaxProcessor, {


initialize: function() {},

setLOIQualifier: function(companyvalue) {

var vDomain;
var vCompany;

var domainValue = new GlideRecord('core_company');
domainValue.addEncodedQuery("customer=true^sys_id="+companyvalue);
domainValue.query();
if (domainValue.next()) {
vDomain = domainValue.sys_domain;
}

var members1 = [];
var members2 = [];
var arrayUtil = new ArrayUtil();

var gr = new GlideRecord('sys_user_visibility');
gr.addEncodedQuery('user.active=true^user.locked_out=false^user.user_nameLIKTest.com^sys_domain=' +vDomain);
gr.query();
while (gr.next()) {
members1.push(gr.getValue('user'));
}
var allMembers = arrayUtil.unique(members1);
return 'sys_idIN' + allMembers.toString();

},

type: 'loiDomainUsers'
});

 

and below is the reference qualifier in the list collector.

javascript: new global.loiDomainUsers().setLOIQualifier(current.variables.company);.

 

Any suggestion that we get the data with email id also in the List collector.

ex: Name       Email

     test1         test1@gmail.com

     test2         test2@gmail.com

 

 

 

Regards, 

Vinod.

Hi @chanti

No need to change the script include, just add the variable attributes as @Jaspal Singh suggested.

Then you can see the both display value along with user email.

 

Thanks,

Murthy

Thanks,
Murthy

Sohail Khilji
Kilo Patron
Kilo Patron

Hi,

In the 'variable attribute' set this value below, this will show the name and email id field. Name field cannot be avoided..

 

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=name;email,ref_ac_columns_search=true,ref_ac_order_by=name

 

Thanks,

Sohail Khilji.

Kindly Mark Correct Or Helpful if it addresses your concern.... 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect