O'Reilly logo

Mastering ServiceNow by Martin Wood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the State field

The state of a task drives a tremendous amount of business logic in a typical ServiceNow application. It represents how a task is progressing – whether it should be worked on, whether it actually is being worked on, and when the task is done. This may drive e-mail notifications, be a trigger for service-level monitoring, and be a condition for a security rule, to name but a few.

The state field on the Task table is an integer choice field. This means a number is stored in the database, while the available options are given labels. In general, scripts use the number value, while the UI displays the label. This table shows the relationship between the two.

Label

Number

Description

Pending

-5

The task exists, but ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required