Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Script evaluation of fields by data type

Script fields evaluate data based on the field type of the input.

TypeEvaluates to in scriptExample
StringThe string"dog" > "dog"
DecimalA number with up to two decimal points12.34 > 12.34
IntegerA number with zero decimal points12 > 12
True / Falsetrue or false
Image omitted: CheckOn.png
The true icon > true
Image omitted: CheckOff.png
The false icon > false
DateA date formatted as yyyy-mm-dd2008-11-04
Date-timeA day and time formatted as yyyy-mm-dd hh:mm:ss2008-11-04 06:46:20
Duration

A date that is equal to January 1st 1970 00:00:00 + the amount of time of the duration being stored

Note: This date corresponds to the system time zone. If a different user time zone has been specified, the date and time value may appear different for that user.

Image omitted: ZeroDuration.png
> "1970-01-01 00:00:00"
Image omitted: TestDuration.png
> "1970-01-02 02:03:04"
ChoiceReturns the contents of the value field for the `sys_choice` record associated with that choice. See: Choice List for more information on returning the value associated with a particular item in a choice list.
Image omitted: BasicSelect.png
> "2" \(Note that this value is is a string\)
JournalReturns a string of all entries made to that journal field. See Journal Fields for scripting of journal type fieldsThe web server is down > The web server is down
ReferenceReturns the `sys_id` of the record that is referenced
Image omitted: Reference.png
> "287ee6fea9fe198100ada7950d0b1b73"
ImageReturns the path to the image
Image omitted: ImageFiletype.png
> images/icons/image\_name.gif
URLReturns a string
Image omitted: URLExample.png
> "http://www.service-now.com"
Glide ListsReturns a string of comma-separated Sys IDs
Image omitted: GlideListExample.png
> 5137153cc611227c000bbd1bd8cd2007,46d14f04a9fe19810142e40c6b071512

Parent Topic:Scripting