How to access variable set value in business rule ??

Nawal Kishor Si
Tera Contributor

 Hi experts,

 i have created the record producer and after submit it. it shown in fetched table ticket... based on insert into the table i want to access the variable set value and triggerd the notification but after inset business rule ..im not able to access the variable set value...it showing 'undefined'.

 

please provide solution 

Thank you

 

12 REPLIES 12

Shubham44
ServiceNow Employee
ServiceNow Employee

hi,
The variables are stored in the question_answer table, you can gliderecord in that table using the current record sys id and then fetch the variable value in JSON format and use it further.

Please mark it helpful as appropriate.

can u provide example code for that.

Thanks shubham.

ar arr = [];
var obj = {};
var incRec = new GlideRecord('question_answer');
incRec.addQuery('table_sys_id', current.sys_id);
incRec.query();
while (incRec.next()) {
var variableValue = incRec.value;
var variableLabel = incRec.question.getDisplayValue();
obj[variableLabel] = variableValue.toString();
}