tommeh_1337

Copy RITM variables to summary (simple)

May 14th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var varLabel;
  2. var varValue;
  3. var arrUtil = new ArrayUtil();
  4. var set = new GlideappVariablePoolQuestionSet();
  5. set.setRequestID(current.getUniqueValue()); set.load();
  6. var vs = set.getFlatQuestions();
  7. for (var i=0; i < vs.size(); i++){
  8.     varLabel = vs.get(i).getLabel(); //get label of variable
  9.     varValue = vs.get(i).getDisplayValue(); //get display value of variable
  10.     if(varValue != '' && varLabel != null){ //value is not empty or null
  11.         answer +=(varLabel + " = " + varValue + "\n");
  12.     }
  13.  }
  14.    
  15. current.u_summary = answer;
  16. current.update();
Advertisement
Add Comment
Please, Sign In to add comment