- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2015 06:58 AM
Hi,
I'm new to the community and trying to administer Service Now. We use Record Producers to create Standard Change Requests.
I have an issue that I want to automatically populate a field "Jurisdiction" (on the change request table) based on which Data Center the user chooses (in the Record Producer). I do not want to use an If statement as that would need to be updated with every new DC and Jurisdiction our company enters (on every standard change we create). These fields are linked in our CMDB and for the regularly submitted Change Requests we use an OnChange Client Script. (See below):
var data_center = g_form.getReference('u_data_center', setDC); |
function setDC(data_center) {
if (data_center)
g_form.setValue('u_jurisdiction', data_center.u_jurisdiction); |
}
I figured I'd be able to use the same get reference in my Record Producer however when the Record producer get to the Get Reference line it aborts.
I have tried different variants however besides hard coding the value I can't figure it out.
Is there a problem with using g_form.getReference from a Record Producer?
Thanks
Tess
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2015 07:07 AM
I would make sure that your record producer variables are actually called u_data_center and u_jurisdiction
If you're just looking to populate the change with that info I would do this in a producer script using the following:
current.u_jurisdiction = producer.u_data_center.u_jurisdiction;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2015 07:07 AM
I would make sure that your record producer variables are actually called u_data_center and u_jurisdiction
If you're just looking to populate the change with that info I would do this in a producer script using the following:
current.u_jurisdiction = producer.u_data_center.u_jurisdiction;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2015 07:25 AM
Thank you,
I knew there was something simple I missed, I believed I tried everything but that.
/Tess