- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2016 06:11 AM
I'm trying to get a list of project records via the REST API in order to show these records along with records from a few other tables in a more cohesive format than database views provide (I'm using Angular to achieve this). My problem is getting access to the display values for the various reference fields that I need to show. I can see that a "display_value" is provided for reference fields when I take a look at the XML generated when I travel to my URI via browser, but I'm unable to get this information to actually show in the table I'm generating. To make matters more difficult, this is also occurring with my "state" fields, as they're showing their numeric values and I can see no display_value provided.
The syntax I'm using to get the display value is
{{proj.project_manager.display_value}}
where "proj" is a reference to the project being shown. When I try this without the display_value bit I get a JSON object that includes a link to the record and the sysID but no display value.
Is there anyone who may be able to tell me what I'm doing wrong or perhaps suggest a different way of getting this information?
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2016 07:15 AM
Hi Antonio,
You first need to make sure that you're passing either the sysparm_display_value=true or sysparm_display_value=all parameters in your rest call so you are getting the display values back. If you don't pass that parameter it assumes you don't need display values.
Once you verify you're passing that could you post a bit more of the code so we have some context for proj, etc?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2016 06:31 AM
You should try with proj.project_manager.name

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2016 07:15 AM
Hi Antonio,
You first need to make sure that you're passing either the sysparm_display_value=true or sysparm_display_value=all parameters in your rest call so you are getting the display values back. If you don't pass that parameter it assumes you don't need display values.
Once you verify you're passing that could you post a bit more of the code so we have some context for proj, etc?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2016 07:18 AM
You beat me to the punch! I just found this solution here: Return Reference Display Value with REST API