Difference between "incident state" and "state" field

Govind Kumar S1
Kilo Guru

Hi All,

We have 2 fields OOB in ServiceNow "incident state" and   "state" . Can someone please explain me why these two are provided in Servicenow. Is their any difference between these two fields( State -> Task table , Incident state -> incident table ). is their any scenario(situation)   when we should use specific field or both are same.

Thanks & Regards

Govind Sharma

8 REPLIES 8

Also points from the below thread


Status / Incident State


srinivasthelu
Tera Guru

Hi Govind,



The other advantage that i see with state field is,



When you run any report against task table to find out how many tasks(incidents, problems, changes) completed by user, this field will come in handy.



Thanks


Srini


Brian Dailey1
Kilo Sage

Hi Govind,



I think the incident_state field is a legacy holdover from earlier versions.   There are business rules syncing state <--> incident_state in both directions.   There are also some rules and UI Actions referencing one, and some the other.



Personally, I found it to be frustratingly inefficient and took the time to remove incident_state from the equation (almost).


  • converted all conditions, UIAs, and BRs to use state
  • Reordered business rules to:
    copy state-->incident_state (early)
    copy incident_state-->state (last, only if incident_state changes and incident_state != state)


Those two business rules doing the sync are OOB, but changing the ordering and conditions a bit gives state the preferential treatment.   I left the field (incident_state) and the sync BR's in just in case another app out there still refers to it.   But everything I run, I use state.



I did similar renovations surrounding request_state (more complex) and problem_state.   It took a while, but was worth the effort.   That OOB syncing of values would give some unexpected results sometimes unless you included code to set both fields in your actions/etc.





Thanks,


-Brian


Prasad Dhumal
Mega Sage
Mega Sage

The incident table is actually a child of the "task" table, and thus has columns from the task table passed down into it.

Please mark my answer as correct and close the thread so that others can also benefit.

Regards

Prasad Dhumal