Record Producer Values in Service Portal Ticket Fields Widget

Nia McCash
Mega Sage
Mega Sage

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.

sp_getVariablesArray.jpg

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.

1 ACCEPTED SOLUTION

Hello,



You could check 'question_answer' table


View solution in original post

12 REPLIES 12

Hi Nolan,


The screenshot I provided is from this out-of-box widget: https://[instance].service-now.com/sp_config?id=widget_editor&sys_id=5736bf52cb30020000f8d856634c9c2...  



If you no longer have it or want me to paste the code widget here for you, let me know.


Nia,



Thanks for quick response.   I am able to see the out of box widget in fact that is what I am using but not sure how the variables will get populated from a newly created record producer.   The Ticket Fields widget is working when I submit a password reset like you stated but can't get it to work on a record producer I just created.



Hope that makes sense.



Thanks



What is displayed when using my new record producer using the Ticket Fields widget



RP.JPG



What is displayed with password reset record producer with the same Ticket Fields widget on incident


Password.JPG


HI Nolan,



I noticed that a record producer for an RITM is does not generate any records in the sc_item_produced_record table.   This may be why we're not seeing the variables there.



But I don't have a definite answer for you as I'm still not sure about what magic function $sp.getVariablesArray() does.   As I mentioned in my original post, I couldn't find documentation on the function.


Thank you


ryanwoodburn
Kilo Expert

Hi



Did anyone ever get to the bottom of this?   I am having the same issue



Thanks


Ryan