POST API using Table API with Reference Field using partial display value or another field within the referenced record
This content was last updated in 2023. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2020 02:16 PM
Is there a way to do an API POST into a table such as the Change Request that has a reference field if you want to supply either just a partial of the display value or a field within the referenced record?
For instance, if I want to set the Assignment Group but I only supply the first word of the Assignment Group name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2020 04:17 PM
Unfortunately, no. It's necessary to call Table API to get the sys_id of the Assignment group first or to create a scripted REST API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 09:55 AM
Hello Brenth
i am not sure if you still looking, you need to add sysparm_display_value=all to your end point
and from your json add the display name
Thanks
Bch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 11:21 AM
Hey,
You got me excited for a second, I thought something had changed in Utah, but I just tested this and it doesn't work. sysparm_display_value=all is for now/table api not the sn_sc/servicecatalog api. It also doesn't appear on any of the documentation for sn_sc api calls (though that isn't necessarily proof).