- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 11:08 PM
Hi All,
I have created the record producer and i selected the target table as "remediation_rule" and once I submitted the record procedure the record is getting created in the "remediation_rule" table. and i am trying to get the variable value using the below script but it's not working as expected
Variable will access only Incident change table like that ..? becase the same log working in those table
var gr = new GlideRecord('remediation_rule');
gr.addQuery('sys_id', 'ae4d693a2fdf011009d159ab2799b693');
gr.query();
if(gr.next()){
var name = gr.variables.test;
gs.info(name);
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 12:35 AM
Can you check if there is an entry in question_answer table once for the submitted record with required values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 12:25 AM
What are you getting from the script, can you give more details?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 12:29 AM
This is my record producer
after i submitted the above record producer its creating record properly and i am trying to get the value using below script
var gr = new GlideRecord('remediation_rule');
gr.addQuery('sys_id', 'ae4d693a2fdf011009d159ab2799b693');
gr.query();
if(gr.next()){
var name = gr.variables.test;
gs.info(name);
}
Getting below output but i need value what i entered in the from

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 12:35 AM
Can you check if there is an entry in question_answer table once for the submitted record with required values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 01:05 AM
Yes, i can able to see the values in the "question_answer" tables.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 01:05 AM
Hi,
scope issue?
record producer is in which scope?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader