Scoped GlideElementDescriptor - isChoiceTable()

Returns true if the element is defined as a dropdown choice in its dictionary definition.

Choice fields cannnot be encrypted.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean Returns true if the element is defined as a dropdown choice. Returns true even if there are no entries defined in the choice table. The last choice type, suggestion, does not return true.
var grInc = new GlideRecord('incident');
grInc.query('priority', '1');

var field = grInc.getElement('priority');
var ed = field.getED();

var isChoiceTable = ed.isChoiceTable();
gs.info(isChoiceTable);

Output: true