Display "User ID" instead of "User Name" in the catalog item variable that refers to sys_user table

Maloy Banerjee
Mega Expert

Hi Team,

 

In the catalog item form, I have a variable that refers to sys_user table. On selecting any user the display value comes out to be the user's name (see below screenshot).

 

find_real_file.png

 

Requirement: Instead of the user's name, I need to display the user ID. 

 

find_real_file.png

 

How is this possible? Please suggest.

 

 

Thanks,

Maloy

4 REPLIES 4

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

check the thread below:

https://community.servicenow.com/community?id=community_question&sys_id=9bb18f69db98dbc01dcaf3231f96...

You can set the Display value to user_id in the sys_user table, however this change will be globally in the platform, just keep in mind of this impact.

I don't think there is another way to achieve that.

If I have answered your question, please mark my response as correct and/or helpful.

Thank you very much

Cheers
Alberto

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Navigate to Dictionary-> Filter on table = sys_user

There is a flag called Display on the dictionaries, you need to turn it to false for user name and turn it to true for user id.

 

PS: it will be a global change and not limited to your functionality

 

-anurag

-Anurag

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi,

What is the use case here? Like the other replies, it isn't possible to change for a specific field. But depending on the requirement, you can do like in your picture if you want, meaning having a string field below that automatically does a glideAjax call to look up the users user ID and populate it in the read-only string field.

You can also make so when searching for users, userID also works for search and would show up in the search results before you select a user.

//Göran
Feel free to connect:
LinkedIn
Subscribe to my YouTube Channel
or look at my Book: The Witch Doctor’s Guide To ServiceNow

ggg
Giga Guru

create another field on your record and populate with the sys_user userid. display this field.