Name
global.STTRMConditionTypeSNC
Description
ServicenNow code for the STTRMConditionType class
Script
var STTRMConditionTypeSNC = Class.create();
STTRMConditionTypeSNC.prototype = {
initialize: function(conditionTypeGr, _gs) {
this._gr = conditionTypeGr;
this._gs = _gs;
},
evaluate: function(currentGr) {
var conditionType = this._gr.getValue("condition_type");
if (conditionType === "condition")
return GlideFilter.checkRecord(currentGr, this._gr.getValue("condition"), true);
if (conditionType === "script")
return new GlideScopedEvaluator().evaluateScript(this._gr, "condition_script", {"current": currentGr});
return false;
},
type: 'STTRMConditionTypeSNC'
};
Sys ID
058c66d45303101034d1ddeeff7b1295