The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How can get choice's label in JSON & REST

ericwtng
Mega Contributor

Hello,

service now have two kind of method to get data from the api

1. JSON

https://_____.service-now.com/__tablename___.do?JSONv2

2. REST

https://_____.service-now.com/api/now/v1/table/__tablename___/__sysid___?sysparm_exclude_ref_link=tr...

My question is, how can i get the choice label name.


In the returned json, the field { u_choice : 0 } is meaningfulness

so where can i find the list for the specific choice label.

how can i call it in JSON & REST

----

In the new choices table, we can find the labelname with value.

Screen Shot 2015-07-10 at 8.59.50 am.png

Thanks.

1 ACCEPTED SOLUTION

Mike Allen
Mega Sage

You can call the table sys_choice, name = tablename, element = field name and that will give you the Label of the field.


View solution in original post

1 REPLY 1

Mike Allen
Mega Sage

You can call the table sys_choice, name = tablename, element = field name and that will give you the Label of the field.