GlideSystem - getDisplayColumn(String tableName)

Gets the display column for the table.

Table 1. Parameters
Name Type Description
tableName String Name of the table from which to get the display column name.
Table 2. Returns
Type Description
String Display column name

// Return the sys_id value for a given table and its display value
function GetIDValue(table, displayValue) { 
    var rec = new GlideRecord(table);
    var dn = gs.getDisplayColumn(table);
    if (rec.get(dn, displayValue))
        return rec.sys_id;
        return null;