data type of display value of a column(not internal type) using rest api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2024 09:07 AM
I want to retrieve the data type of column, not internal type. I know how to get internal type using sys_dictionary, I am looking for data type of column for example
state column in task table has internal type integer but display value is string(Open, closed)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2024 06:15 AM
Would this get what you want?
var typeval = g_form.getDisplayValue(variableName);
g_form.addInfoMessage(typeof typeval);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2024 08:45 AM
I am looking for using RestAPI (table api), do you know parallel of this in rest api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2024 06:30 PM
Hi @kanikag
In the REST API explorer, you have a query parameter "sysparm_display_value" which defaults to false. Whenever it is false, the REST API response will always have the internal or the actual values being returned. If you make it true, you will get the display value. Refer below snips for better understanding -
1. When sysparm_display_value is false or not defined (default false) :
2. When sysparm_display_value is true :
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2024 10:12 PM
Hi Amit, I am looking for the data type of the display value here, for state I am trying to fetch string data type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2024 08:52 PM
If you want to get the data type, you need to query the sys_dictionary table with the right filter condition. Refer below screenshots where I am trying to get the data type of state field.
Please mark this response as correct and helpful if it assisted you with your question.