Pushing cascade variables from the Order Guide to the Request form **SOLUTION**

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2013 10:56 AM
I believe I have finally created a simple solution for populating the Request with cascaded variables from the Describe Needs page of the Order Guide. I searched for over a week and couldn't get a clear solution, but will try to make this as clear as possible. I'm assuming anyone looking for this solution has a basic knowledge of ServiceNow and already knows how to create a field on a form, a new Business Rule, etc.. We are currently running Calgary Patch 1, so I cannot say if the following instructions will work on earlier releases:
1) Pull up your Order Guide, right click the header and select 'Personalize Item'
2) Ensure the 'Cascade Variables' checkbox is checked (TRUE) on the Order Guide
- if it's not displaying on the Order Guide, you'll need to personalize the form to add it
3) Add a matching variable (NOT FIELD) on each item offered in the Order Guide
- if you have a variable on the Describe Needs page called 'u_employee_name', you need to add a variable to the items called 'u_employee_name'
- if you have a single item that will ALWAYS be included in the Order Guide bundle, you could get away with adding a variable only to that item
- the best way to ensure the variables match exactly is to create a Variable Set and add it to the Order Guide along with the items
- if they aren't already visible on the item form, you'll want to Personalize -> Related Lists and add 'Variable->Cat item' and 'Variable Sets'
**NOTE
This part was very confusing to me and I couldn't get a straight answer from my research. I added fields to the RITM form, the Item form, etc.. and it never work. FINALLY, I added a variable to the item itself (named the same as the Describe Needs variable on the Order Guide) and magic finally happened. I ultimately used a Variable Set which save a TON of time and ensures the variables match exactly between the Order Guide and Items.
4) Set the system property 'glide.sc.reset_cascade' to TRUE if you want the item's cascaded values to update if they change on the Describe Needs page
5) If desired, create UI Policies against the Catalog items to make the cascaded variables READ ONLY or Hidden altogether. (I hid our values on each item)
- once you have performed Steps 1-5, the matching variables should now cascade from the 'Describe Needs' page down to each bundled item
6) Create field(s) on the Request form that will hold the desired cascaded variables we'll retrieve from the attached Requested Items
7) Create fields on the Request form that will hold the desired variables, currently stored on the attached Requested Items.
- the names and labels of these fields are irrelevant and don't have to match the variable names as they did in previous steps
😎 Now we can create a Business Rule that will pull these values from the Requested Item(s) and place them on the actual Request form in our new fields
Name: Push RITM variables to Request form
Table: Request[sc_request]
When: AFTER INSERT
Script:
var gr = new GlideRecord('sc_req_item'); gr.addQuery('request', current.sys_id); gr.query(); if (gr.next()) { current.u_name = gr.variables.new_hire_name; current.u_department = gr.variables.new_hire_dept; current.update(); }
9) This short piece of code is working perfectly and now we have the Name and Department of the new hire on our Request form and each requested item
Hopefully this guide will prevent the next person from spending the week of research I endured and expedite this process.
This is my first post, but please feel free to add improvements or suggestions to the content and I hope I was able to help!!
Best regards,
Mark
Lead ITSM Solution Architect
Sterling Jewelers
- Labels:
-
Service Catalog
- 12,011 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2015 11:59 AM
Great job, Mark. Thanks for this - exactly what I was looking for. I knew about cascading variables etc, but need to pull them over onto hardcoded fields. Haven't implemented as yet, but really appreciate the post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2015 09:33 AM
I'm doing something similar and hiding the variables that are cascaded on the individual items pages so the clients don't see them. It's easy to hide the individual variables but the header for the set still displays. Any idea on how to hide this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2016 10:30 PM
I'm trying to just copy a variable set from a record producer to a variable set in a request via the cascade variables functionality, and no matter what I do it just doesn't work. Very frustrating - and there is very little documentation available.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 02:44 AM
Hello Mark,
Thank you for this post.
I have the same requirement and have followed the steps suggested above to achieve the same.
I have created an Order Guide and we have requirement to capture the variables from Describe needs page of order guide and populate the same on Request description. For this, We have created a variable set on the order guide and using the same on all the items whichever is added to the order guide and through Business rule we are fetching the values to Request description. We are able to hide this variable set on the catalog item page when the items are added on the order guide. We are facing an issue while hiding this variable set on the individual item. When i add the variable set to the item and write a script to hide the same on the catalog item, it works fine on those items which do not have an UI policies written on Catalog Item page. But on the items which has UI policies written on the catalog item page, it does not work. The variable set as well have few UI policies. We tried to change the orders of UI policies on the item and of the variable set and tried. But it did not help.
Please suggest as this is one of the critical requirements from our project.
Thanks in advance!
Best Regards,
Nayana DC