How to display userID and name as single value in a field from a list

ServiceNow Use6
Tera Guru

Hi,

I have a list variable type, i want the values in the list to be showing userid and the name for each value, how can i do it?

find_real_file.png

Regards

Suman P.

1 ACCEPTED SOLUTION

Bharath kumar6
Tera Expert

Hi,

Write the script - "ref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns=name;user_name;" in the variable attributes of the List collector.

find_real_file.png

find_real_file.png

 

Mark Correct AND Helpful if it helps you resolve the issue. Thanks!

View solution in original post

3 REPLIES 3

Anil Lande
Kilo Patron

Hi,

I hope you are talking about the field of type List and referring to User <sys_user> table.

If you want that change for only one field then it is not possible. As per OOB (system) configuration we can have only one field display=true, and for user table 'Name' field is set as display value and it is appearing in all fields referring user table.

If you want userID and Name then you need to modify display value for Table (which will impact everywhere) and for that you may need to create new custom field which will store combination of UserId and Name.

 

However you can add below attributes to your field dictionary to show additional columns when user start typing user name.

Reference Field Auto-Complete Attributes

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Bharath kumar6
Tera Expert

Hi,

Write the script - "ref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns=name;user_name;" in the variable attributes of the List collector.

find_real_file.png

find_real_file.png

 

Mark Correct AND Helpful if it helps you resolve the issue. Thanks!

Hi,

Happy to see your issue is resolved. 

I believe I had shared same solution and instead of rewriting it I had shared a link for the same steps.

 

Thanks,
Anil Lande

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande