REST API of Database view, fetching variables and catalog task fields

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 12:22 AM
Hello Developers,
I've crated a Database view and created a table api of the table created. After applying sysparm_fields, i'm fetching variables on the catalog task and other task fields. The Road block is whenever variable is reference type then in response i'm getting sys_id as value, instead of sys_id we need the display value. I know we can do this via scripted REST API, However we want to do it via database view only, If any help can be done then that would be great.
I'm attaching screenshots of both the outputs that is from scripted rest and database view table api.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 12:44 AM
Hi Prabhat,
in the sysparm_fields you can dot walk and get the display value;
op_value is a reference field which points to some table; that table must be having some name etc column which is display = true
use that in sysparm_fields
op_value.name
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 10:31 PM
Hi Ankur,
I've done this, it didn't worked. If i'm using dot walking then that fields itself is not coming in response.
Value column in Options table is string type and i've set the display to true in dictionary as well, again didn't worked. sysparam_dispaly_value is already true.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 01:00 AM
Hello,
Did you try adding
sysparm_display_value=true
in API ?
Thanks,
Ali
Thank you,
Ali

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 10:32 PM
Hi Ahmmed,
I've done this, it didn't worked. If i'm using dot walking then that fields itself is not coming in response.
Value column in Options table is string type and i've set the display to true in dictionary as well, again didn't worked. sysparam_dispaly_value is already true.