GlideRecord - getED()

Returns the element's descriptor.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
GlideElementDescriptor Element's descriptor

Scoped equivalent

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

var totalCritical  = 0;
var filledCritical = 0;
var fields         = current.getFields();
 
gs.print(fields);
 
for (var num = 0; num < fields.size(); num++) {
 
	gs.print("RUNNING ARRAY VALUE " + num);
 
	var ed = fields.get(num).getED();
 
	if(ed.hasAttribute("tiaa_critical")) {
		gs.print("CRITICAL FIELD FOUND");
		totalCritical ++;
 
		if (!fields.get(num).isNil()) {
			filledCritical ++;
		}
	}
 
}
 
var answer = 0;
gs.print("TOTAL - " + totalCritical);
gs.print("FILLED - " + filledCritical);
 
if (filledCritical > 0 && totalCritical > 0) {
 
	var pcnt = (filledCritical/totalCritical)*100;
	answer = pcnt.toFixed(2);;
 
}
 
answer;