- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2016 07:45 AM
part of my script:
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(item.sys_id);
set.load();
var vs = set.getFlatQuestions();
for (var i=0; i < vs.size(); i++) {
if (vs.getLabel() != "" && vs.getDisplayValue() != "" && vs.getDisplayValue()!='false' ) {
gs.print("<br/> <b>" + vs.get(i).getLabel() + "</b> = " + vs.get(i).getDisplayValue() + "");
}
I have taken it from a mail script and executing in the background scripts. In both I am getting results where the VALUE of the Variable is coming through as 'false'
How do I stop this?
I have tried all manner or things but would prefer to know what object parameters and legal operations exist? I cannot find this document anywhere.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2016 07:50 AM
Your code should be this
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(current.sys_id.toString());
set.load();
var vs = set.getFlatQuestions();
for (var i = 0; i < vs.size(); i++) {
if (vs.get(i).getLabel() != '' && vs.get(i).getDisplayValue()!='' && vs.get(i).getDisplayValue()!='false') {
test +=' ' + vs.get(i).getLabel() + " = " + vs.get(i).getDisplayValue() + "<br/>";
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2016 07:50 AM
Your code should be this
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(current.sys_id.toString());
set.load();
var vs = set.getFlatQuestions();
for (var i = 0; i < vs.size(); i++) {
if (vs.get(i).getLabel() != '' && vs.get(i).getDisplayValue()!='' && vs.get(i).getDisplayValue()!='false') {
test +=' ' + vs.get(i).getLabel() + " = " + vs.get(i).getDisplayValue() + "<br/>";
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2016 07:54 AM
Thanks I was not comparing the array element but the array itself!??
the getFlatQuestions is just a GlideRecord object? so I was able to step back and check myself lol
you got there first! thank you...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2016 07:57 AM
Glad you got this resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2016 11:54 AM
mrswann, Is there any any api or documentation for the GlideappVariablePoolQuestionSet object. I couldn't find any in the GlideRecord documents....