The RITM state is showing in value, instead of label
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 09:17 PM
When I am hitting a request using postman, The RITM state is showing in value, instead of label.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 09:40 PM
Hi @snbansode ,
Right-click on the state and click on configure choices and check the following:
Again, Right-click on the state and click on "Configure Dictionary" and check if the Field type is "integer"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 06:01 AM
Hello, thanks for the reply.
Yes I have already checked the configuration it is correctly set, even If I hit the request from Rest api explorer it is working fine, and by using normal catalog item flow also it is working fine.
Whenever I am hitting the send button on POSTMAN it is showing state in value 1, not the label.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2024 07:06 AM
Hi,
When using Postman (or any external API tool), you have to tell it what you want it to do with the field values by passing the sysparm_display_value value.
Return field display values (true), actual values (false), or both (all) (default: false)
Adding this to the query will return different results:
.../api/now/table/sc_req_item?sysparm_display_value=true
will return: "state": "Open",
.../api/now/table/sc_req_item?sysparm_display_value=false
will return: "state": "1",
.../api/now/table/sc_req_item?sysparm_display_value=all
will return: "state": {"display_value": "Open", "value": "1" },
Hope this helps!
Ian
