on a reference field need to set user id along with name

Mujahidk
Giga Contributor

i have a requirement where i need to set User ID along with name on reference field, working on catalog item we have a field requested for shown below , beside the name i want user id for that user , any solution will be appreciated!!!

Mujahidk_0-1757327569895.png

 

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

You can only display one field in a reference field/variable.  The value of the reference field/variable will always be the sys_id of the record from the referenced table.  You can add User ID to the typeahead search so that it displays when selecting a record, but otherwise another Catalog Item variable will be needed. You can use the auto-populate feature and make it read only if you'd like.

Hi @Mujahidk 

Not possible. Out-of-the-box, the sys_user table uses the Name field as the display value.

That means whenever you select a user from a reference field, you’ll always see the Name (not the User ID).

Best Alternative

If you need to show the User ID, you can:

  • Create a separate string-type variable.

  • Use the Auto-populate feature to fill it automatically from the reference field.

  • Set this User ID variable to read-only, so users can see it but not change it.

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

Ankur Bawiskar
Tera Patron
Tera Patron

@Mujahidk 

Not possible. OOTB sys_user has Name field as Display

So you will always see the Name when you select Reference field.

Best alternative

> To show User ID you can create a separate string type variable and use Auto populate feature and populate that and no scripting required.

-> Ensure you make that User ID variable as readonly

Auto-populate a variable based on a reference type variable (Utah) 

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