How to display email in the variable when it is a list collector

poornima batchu
Tera Expert

Hi All,

I created two variables which are list collector type from the sys_user table. when I select the user from the list it is displaying the username but for other variable, I want to display the user email. please provide solutions.

poornimabatchu_0-1674124226525.png

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@poornima batchu 

for the other variable use variable attributes and add email field. it will start showing email when user types something in list collecotr

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@poornima batchu 

for the other variable use variable attributes and add email field. it will start showing email when user types something in list collecotr

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

poornima batchu
Tera Expert

Hi @Ankur Bawiskar 

I have already added this

 ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true in the attributes section It is displaying the username and email as expected but when I select the user It should display only email in the input field but it is displaying username just like the above journey requestee name variable

@poornima batchu 

not possible

it will always display field which is Display=true on sys_user table and in this case it's name field

to show email you need to make email field as Display=true on sys_user table

but remember this will be platform level change and will impact all reference fields which refer to sys_user table as it will start showing email instead of name

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

poornima batchu
Tera Expert

Thanks for your response @Ankur Bawiskar 

Can you please help me with the scripting part. How can I able to pull the email of the user automatically depending on the Journey requestee name variable