retrieve all catalog variables - OOTB method

var keys = [];
    var set = new GlideappVariablePoolQuestionSet();
    set.setRequestID(current.sys_id);
    set.load();
    var vs = set.getFlatQuestions();
    var vardata = "";

    for (var i = 0; i < vs.size(); i++) {
        if (vs.get(i).getLabel() != '') {

            vardata = vardata + ('     ' + vs.get(i).getLabel() + " : " + vs.get(i).getDisplayValue() + "\n");

        }
    }

Comments

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

Running transform maps asynchronously