How to get Table Displayvalue through Rest APi

prasad48
Tera Guru

I am calling user table Via REST API as below.How do i get Display value . In Below Scenario i should get Name Column(User Table).Please help

https://xxx.service-now.com/api/now/table/sys_user?

5 REPLIES 5

Chuck Tomasi
Tera Patron

If you want the display values for the reference fields, add this to your URI

sysparm_display_value=true

If you want both sys_id and display value use this

sysparm_display_value=all

Use the REST API explorer to test.

REST API | ServiceNow Docs

Use the REST API Explorer

 

 

 

Thanks for your Response.My requirement is for not reference columns.Suppose if i call user table it should give name .Please help


The rules for how a display value are determined go like this:


  • Is there a field with the display field set to true?
  • Is there a dictionary override (for an extended table) with a display value override set
  • Is there a field called number, name, u_number, or u_name


That is how the system determines what the display value is. It's not a query you can make via REST to say "Here's a sys_id of a user record, send me back the display value."



I love the idea and invite you to open an enhancement request! Our product managers DO listen.


Enhancement requests: Tell us how you would improve the ServiceNow product


Please let me know if I have answered your question or if you still have an outstanding issue. I would like to mark this as answered so it is removed from the Unanswered list.