Hey, 

So, some values do return. But other values do not return. e.g.

find_real_file.png

I will have a look at the ACL. Maybe it's something to do with the type of variable? 

Or in the screenshot the question label is the same for multiple questions.

"What do you want to do?" and in the return object you are storing it as the key

obj[vname]

 

 

 

 

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022

Waseem4
Tera Expert

Issue is now resolved. I had to add an if condition to look for only populated display values. 

            var set = new GlideappVariablePoolQuestionSet();
			set.setRequestID(grRitm.sys_id); // requested item sys_id
			set.setTaskID(grRitm.sys_id);
			set.load();

			var vs = set.getFlatQuestions();

			for (var i = 0; i < vs.size(); i++) {
				var vname = vs.get(i).getLabel().toString();
			if(vs.get(i).getDisplayValue() != '') {
				obj[vname] = {
					"display_value": vs.get(i).getDisplayValue(),
					"value": vs.get(i).getValue().toString()
					
				};

View solution in original post

But your screenshot of SCTASK had a value for the question...right?

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022

Hi, 

 

Because there were multiple questions with the same name, it was displaying the question which didn't have a value. So had to add an if condition to only display the variables that had values.