GlideElement - getAttribute(String attributeName)

Returns the value of the specified attribute from the dictionary.

If the attribute is a boolean attribute, use getBooleanAttribute(String) to get the value as a boolean rather than as a string.

Table 1. Parameters
Name Type Description
attributeName String Attribute name
Table 2. Returns
Type Description
String Specified attribute's value

Scoped equivalent

To use the getAttribute() method in a scoped application, use the corresponding scoped method: Scoped GlideElement - getAttribute(String attributeName).

function doit() {
  var gr = new GlideRecord('sys_user');
  if ( {
    gs.print("we got one");