Populate Record Producer Field with UserId

Shy
Tera Contributor

I am new to ServiceNow. I am attempting to create a drop-down field on a record producer where the user can select an employee's "User ID". However, I am not able to find the field under the "[User] sys_user" table. Does anyone know where or how I can get this field to populate? I am not familiar with scripting within the platform either. I appreciate any help. Thanks!

2 ACCEPTED SOLUTIONS

Sandeep Rajput
Tera Patron
Tera Patron

@Shy There is a field User ID (user_name) defined on the sys_user table which can be used for showing the select box variable with user id fields.

 

Screenshot 2023-05-30 at 10.43.26 PM.pngScreenshot 2023-05-30 at 10.42.26 PM.png

View solution in original post

This is how you should configure your lookup select box.

Screenshot 2023-05-30 at 10.58.55 PM.png

Screenshot 2023-05-30 at 10.58.24 PM.png

View solution in original post

7 REPLIES 7

Sandeep Rajput
Tera Patron
Tera Patron

@Shy There is a field User ID (user_name) defined on the sys_user table which can be used for showing the select box variable with user id fields.

 

Screenshot 2023-05-30 at 10.43.26 PM.pngScreenshot 2023-05-30 at 10.42.26 PM.png

This is how you should configure your lookup select box.

Screenshot 2023-05-30 at 10.58.55 PM.png

Screenshot 2023-05-30 at 10.58.24 PM.png

Thank you so much for this Sandeep!!!! This worked. 

 

Do you know if it is possible to do a concatenation of First Name + Last Name + ' - ' + UserID  inside of the field?

Glad it worked for you. Please mark my answer correct and helpful.

 

Regarding concatenation, you can make following changes in the lookup label fields to show first name, last name and user id as a display label. Screenshot 2023-05-31 at 7.38.06 AM.pngScreenshot 2023-05-31 at 7.38.50 AM.png