sc_request state and dictionary choices - no values appearing but is present in the API response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 04:42 AM
Sorry if this is a silly question - but I'm going through the process of reviewing the SN Dictionary to see what state values are available/have been defined.
I have done this for the Incident table where the following have been identified:
Label | Value | Language | Sequence | Inactive |
Canceled | 8 | en | 8 | FALSE |
Closed | 7 | en | 7 | FALSE |
In Progress | 2 | en | 2 | FALSE |
New | 1 | en | 1 | FALSE |
On Hold | 3 | en | 3 | FALSE |
Resolved | 6 | en | 6 | FALSE |
When trying to do the same for the sc_request table I'm getting no matches, yet, when making an API request against the sc_request table, I have found both "state": "1", and "request_state": "requested" are populated.
Can anyone help explain where I'm going wrong? Where can I get the possible state values used on the sc_request table, similar to the above? State is returning an integer value of 1, yet where is that value defined? Where can I look up the possible values for the request_state field?
NB. I'm aware that the 'Request state' is used to track the status of the request i.e for service catalogue related requests and that 'State' is used to track the status of the tickets like incident,problem or change.
Many thanks,
Sal
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 05:10 AM
As sc_request table extends from Task table, if there are no choice values defined for state field specific to sc_request table then it uses the choice values available on Task table.
request_state is a field on sc_request table so you can find the choice list in dictionary entry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 06:20 AM
Thanks Swapna for your response.
I have now been able to locate the request_state values via the Dictionary. This is what was returned:
Label | Value | Language | Sequence | Inactive |
Assess | 102 | en | 2 | FALSE |
Closed | 107 | en | 7 | FALSE |
Closed/Resolved | 4 | en | 4 | FALSE |
Fix in Progress | 104 | en | 4 | FALSE |
Known Error | 2 | en | 3 | FALSE |
New | 101 | en | 1 | FALSE |
Open | 1 | en | 1 | FALSE |
Pending Change | 3 | en | 2 | FALSE |
Resolved | 106 | en | 6 | FALSE |
Root Cause Analysis | 103 | en | 3 | FALSE |
However, I'm a little confused about your following statement:
"As sc_request table extends from Task table, if there are no choice values defined for state field specific to sc_request table then it uses the choice values available on Task table."
I can confirm I am unable to locate a "source" field when reviewing the dictionary for sc_request, so it must inherit from the state values defined against the Task table - however, there are over 100 Task.state values defined in the dictionary and it's not clear which of these will be applicable...
Do you have any advice please?
Kind regards,
Sal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 09:36 PM
Please try below URL for State values on TASK table.
Task table is the base table for all types of tickets like Incident, request, change, problem etc. "State" dictionary field is created in base table and inherited to all extended tables. If there are no choice list defined for extended tables then It inherits choice list from Base table.
Hope this information helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 06:14 AM
Hi @SB87,
You can check the state lists for Request state field (request_state) in sys_choice table. Below is the data I can get in my PDI.
Please mark this as correct and helpful if it solves your query or lead you in right direction.
Mohit Kaushik
ServiceNow MVP (2023-2025)