Working With Variable Sets

Variable Iteration

Thanks to Andrew Sainz for finding this

var item = new GlideRecord('sc_req_item');
item.addQuery('sys_id',current.sysapproval);
item.query();

if(item.next())     {
    for (var key in item.variables)      {
        var v = item.variables[key];

        if (v != '' && !v.nil()) {
            current.u_approval_summary +=v.getGlideObject().getQuestion().getLabel() +
                            ': ' + v.getDisplayValue() + "\n";
        }
    }
}