Dealing with drop-down list fields

Drop-down fields in forms, similar to reference fields, can have both a value, and a display value. For example, the State field on tasks-based table forms (such as the Incident form) has a set of state options with names like New, In Progress, and Resolved.

However, the actual value associated with these selection labels is a number. In fact, the State field is specifically a number data-type field. This means that despite the label that's displayed in the drop-down, if we call g_form.getValue('state'), we'll get a numerical value rather than the label we see in the form.

You can see the list of possible ...

Get ServiceNow: Building Powerful Workflows now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.