
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2017 10:46 AM
On my personal dev instance, I noticed that the Ticket Fields widget shows "variables" for an Incident that was created via the Password Reset record producer.
Can someone advise on where this data is stored (ie. where is the relationship/link between the incident and the record producer stored) or how this is achieved?
I was able to trace it to this line of code in the widget's Server Script data.variables = $sp.getVariablesArray(); but was unable to find documentation on https://developer.servicenow.com/app.do#!/api_doc?v=istanbul&id=c_GlideSPScriptableScopedAPI for the getVariablesArray() function.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 05:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2017 10:39 AM
Ryan,
I ended up doing this to get them to show up for me. It isn't the cleanest but it solved my issue.
https://community.servicenow.com/message/1109621?et=watches.email.thread#1109621

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2018 04:10 AM
Hi Ryan,
two points to check if don't see some variable fields in "Options" area of your widget, on 'id=ticket' page.
1- Search in 'question_answer' table, if you could find records for "Table sys ID=sys_id of your ticket", because data.variables = $sp.getVariablesArray(); from "Ticket Fields" widget look in this table.
2- if so , when you click on name of a variable in "Question" column to see options,
in "Availability" Tab does the checkbox "Visible on Summaries" is checked ?
in Kingston version, "Ticket Fields" widget filter has changed and use this checkbox value :
... <div class="m-b break-word" ng-repeat="variable in data.variables | filter:{visible_summary:true}"> ...
ex : if you click on "Urgency" in Question column of question_answer table :
( you should arrive on item_option_new table)
NB :
- if you create an Incident from Backoffice, OOTB it doesnt create records in 'question_answer' table
- if you use a record producer to create your ticket, then it should have save answers to your record producer's variables into this table.
Regards,
Denis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2020 01:05 PM
Denis - thanks for point #2 above, this helped me solve an issue I've been chasing for a while.
Does anybody happen to know if there is a way to control the order in which the variables are displayed in the Ticket Fields widget? We are on Madrid Patch 9b and the order of the variables displayed is completely random and changes on every ticket that is submitted. Very strange behavior that is unfortunately client facing and does not provide a very clean client experience.
Thanks!
Mike