Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Return Reference Display Value with REST API

enikx
Kilo Contributor

Hi,

I've been following the REST API guide found here: Getting Started with REST - ServiceNow Wiki

I can return values using the GET method fine, but when I choose fields to return which reference the sys_user table when querying the cmdb_ci_server table, the fields return a link and CI value.

I found that using the JSON web service, I can add a &displayvalue=true parameter which will make these references return their display value (JSONv2 Web Service - ServiceNow Wiki) In this case I am trying to return the users name from sys_user table.

However this displayvalue=true parameter does not work when I append it into my REST URI.

I have been searching for but unable to find a RET equivalent of using displayvalue=true with JSON. Could someone please let me know if the REST equivalent exists?

Thanks

1 ACCEPTED SOLUTION

poyntzj
Kilo Sage

did you add the sys_properties entry ?


just tested here and it works fine


View solution in original post

2 REPLIES 2

poyntzj
Kilo Sage

did you add the sys_properties entry ?


just tested here and it works fine


enikx
Kilo Contributor

Ah yes! Thank you, it was right under my nose this whole time.


I was able to get the reference display values to return by adding &sysparm_display_value=true&sysparm_exclude_reference_link=true to the end of my uri.


Thanks.