How to access variable set value in business rule ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2022 11:19 PM
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
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2022 11:59 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 01:05 AM
can u provide example code for that.
Thanks shubham.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 01:20 AM
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();
}