POST API using Table API with Reference Field using partial display value or another field within the referenced record

brenthubin
Tera Contributor

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?

3 REPLIES 3

Hitoshi Ozawa
Giga Sage
Giga Sage

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.

Hello Brenth

i am not sure if you still looking, you need to add sysparm_display_value=all to your end point 

https://yourinstancename/api/sn_sc/servicecatalog/items/12a0e2921b7ee01080feea02f54bcb3a/order_now?s...

and from your json add the display name 

Thanks

Bch

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). 

OrderNow | Service Catalog API | ServiceNow Developers