sc_request state and dictionary choices - no values appearing but is present in the API response

SB87
Tera Expert

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:

 

LabelValueLanguageSequenceInactive
Canceled8en8FALSE
Closed7en7FALSE
In Progress2en2FALSE
New1en1FALSE
On Hold3en3FALSE
Resolved6en6FALSE

 

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

 

 

4 REPLIES 4

Swapna Abburi
Mega Sage
Mega Sage

@SB87 

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.

SwapnaAbburi_0-1672751306744.png

request_state is a field on sc_request table so you can find the choice list in dictionary entry.

Thanks Swapna for your response. 

 

I have now been able to locate the request_state values via the Dictionary. This is what was returned:

LabelValueLanguageSequenceInactive
Assess102en2FALSE
Closed107en7FALSE
Closed/Resolved4en4FALSE
Fix in Progress104en4FALSE
Known Error2en3FALSE
New101en1FALSE
Open1en1FALSE
Pending Change3en2FALSE
Resolved106en6FALSE
Root Cause Analysis103en3FALSE

 

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

 

@SB87 

Please try below URL for State values on TASK table. 

https://<instanceName>.service-now.com/sys_choice_list.do?sysparm_query=name%3DTask%5Eelement%3DStat...

 

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.

Mohit Kaushik
Mega Sage
Mega Sage

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.

MohitKaushik_0-1672755140660.png

 

Please mark this as correct and helpful if it solves your query or lead you in right direction.

 

 



Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)