Scoped GlideElement - getChoices(String dependent)

Generates a choice list for a field.

Table 1. Parameters
Name Type Description
dependent String Optional: a dependent value
Table 2. Returns
Type Description
Array An array list of choices.
var glideRecord = new GlideRecord('incident'); 
glideRecord.query('priority','1'); 
glideRecord.next(); 
 
// urgency has choice list: 1 - High, 2 - Medium, 3 - Low, with value: 1, 2, 3
var choices = glideRecord.urgency.getChoices(); 
gs.info(choices);

Output: