mmcgui03

How to get ServiceNow to display labels instead of numbers  REST API

Blog Post created by mmcgui03 Advocate on Nov 6, 2020

Hello,

 

Tired of having to look up display values in ServiceNow's syschoices tables to get the display label?  For example, when you create a ServiceNow datalink connector for Servers, the results show the following:

what the heck - right.  This isn't helpful.  What do those darn numbers mean?

 

You can create lookups on portions of the syschoices, to determine the display value or....

You can create a Datalink REST API to get the data and set it to show display values like:

 

The Rest URL will be:

 

https //Your Company.service-now.com/api/now/table/ServiceNow Table Name?sysparm_display_value=true&sysparm_suppress_pagination_header=true

 

Make sure JSON Passthrough is not checked.   Replace Your Company.service-now.com with the name of your ServiceNow Instance and replace ServiceNow Table Name with the name of the table you want to link.

 

This returns:

 

Servicenow has a Rest API Builder that you can use to generate the query (your ServiceNow admin would have to give you access to it) but the code used above also works.

 

Debbie Hagen Guillermo Cuadrado Tiago Nascimento Shelby Ohyama Matt Temple Matthew Benesh Gordana Moore

Outcomes