Display values and their significance

eckstein
Kilo Contributor

What is the significance of dv_ in Istanbul, when would we use this? I have read several docs about display values but need more information on the significance and when we would use dv_

4 REPLIES 4

sachin_namjoshi
Kilo Patron
Kilo Patron

Hi Tara,



Below post has answers to your questions for Display value DV_ uses.



A few Random Tips for ServiceNow Reporting | Jason Dove's Business Intelligence Rants



Regards,


Sachin


JJ1
Kilo Guru

Tara,



This is a good read , Display values .



For a reference field on a servicenow table , the database always stores the value but shows the display value in form view. On incident table where you are the caller ,the XML view will show something like below.



<caller_id display_value="Tara Eckstein">f6245213403a100091119e249e24b6a6</caller_id>


Shishir Srivast
Mega Sage

RAW VALUE VS. DISPLAY VALUE



Some fields have both raw and display values. The State field for Incident, for example, has numeric raw values while the display value might say "Resolved". Other field types, such as date, duration, etc., also have both raw and display values. Also, a reference field's raw value is the sys_id from the related table while the display value is from the display value field of the related table.



SELECT statement specify raw and/or display value of each field. JSONv2, by default, returns raw values unless the "displayvalue" option is set to "true" (display, not raw, values are returned) or "all" (both raw and display values are returned and the display column names are prefixed with "dv_").



In GQL, let's return raw values unless column names start with "dv_", keeping consistent with JSONv2 (the same convention also applies to ODBC SQL). Since what we want in most cases are display values, this will add a bit of extra typing, forcing us to rewrite the above GQL as (see "dv_" for state and cmdb_ci)



You can check for more examples in John Chun Blogs.


GQL (Glide Query Language) Part 2: The Design


eckstein
Kilo Contributor

Thank you!   This has been very helpful!