- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 01:54 PM
I extended the sc_req_item table, was able to add and update the formatter so that it displays the variables, but any changes made to variables are not saved. The save works on sc_req_item, but not on the extended table. Does anyone know what needs to be updated to allow edit of variables from an extension of sc_req_item?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2017 10:20 AM
After speaking with ServiceNow, we approached this solution differently. We kept the records on the sc_req_item table, instead of extending it. Then we added a field called "partitions" that has two values, one of which is default (so showing whatever view they have access to) and position_bundle, which triggers a view rule that forces them into the PositionBundle view. On the new record types, we set partition to "position_bundle" so that the view rules run.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:04 PM
Hi Sanjiv,
I have the formatter already configured and it displays the current variables and their values. However, when I make a change to the value of a variable and save the record, that change is not captured.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:28 PM
Hi Kristen,
Please check if the below link helps.
Directly updating the question,answer table using below script. Not sure, if your vaules are getting stored in question_answer table.
(function executeRule(current, previous /*null when async*/) {
/*
This script is to fix the bug where SN would sometimes give variables on the record order -100 when created through
a Record Producer through the Service Portal.
*/
var qa = new GlideRecord('question_answer');
qa.addQuery('table_sys_id',current.getUniqueValue());
qa.query();
while(qa.next()){
qa.order = qa.question.order;
qa.update();
}
})(current, previous);
Re: troubleshoot variable editor
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:50 PM
This seems to be the table for holding record producer replies, but I've extended sc_req_item. I've reviewed the business rules on sc_req_item and task and don't see anything about changes to variables other than some protections about inserting duplicates. I assume there is something controlling the save of variable value changes on sc_req_item, but I'm unable to find it. I'm trying to avoid customizing too much and just adapting the OOB scripts.