GlideRecord - getDisplayValue()

Retrieves the display value for the current record.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
String Display value for the current record

Scoped equivalent

To use the getDisplayValue() method in a scoped application, use the corresponding scoped method: Scoped GlideRecord - getDisplayValue().

// list will contain a series of display values separated by a comma
  // array will be a javascript array of display values
  var list = current.watch_list.getDisplayValue();
  var array = list.split(",");
  for (var i=0; i < array.length; i++) {
     gs.print("Display value is: " + array[i]);