- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2019 08:26 PM
Hi,
what is the difference between cascade variable and variable sets.
UI action:
I selected one user from the Users List and selected the above option from list choice, I want to get the selected user details (name, email etc) in my script.
Regards,
Sasikala.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2019 08:53 PM
Hi,
variable sets:
Administrators and catalog administrators often define multiple catalog items that use the same group of service catalog variables. Catalog managers and catalog editors can attach a variable set for items and categories to which they are assigned. However, catalog managers and catalog editors cannot create a variable set.
For example, a catalog administrator defines 10 catalog items for types of servers. The request process for all these items asks the same five questions, using the same variables.
Associating these variables individually per catalog item is repetitive, time-consuming, and error-prone. Also, to make a single change to multiple catalog items involves manually changing each item. For example, to add a new variable to 10 catalog items, you would need to manually associate this new variable with each item.
Variable sets allow you to create a collection of structured variables that can be reused across multiple catalog items and order guides. Using variable sets saves time because you do not have to create the same variables individually for many catalog items. Also, when variables should be modified, you can modify the variable set and the changes are reflected across all the catalog items that are associated with the variable set.
Variable sets also allow you to define catalog client scripts and UI policies that are applicable to the variables in the set.
Cascade Variables:
Cascade Variables (once you will click on tick box) are used to allow functionality of using to same value into different catalog item by pulling from initial form.
Cascading allows values entered for variables in the initial order form to be passed to the equivalent variables in the ordered catalog items. For example, a variable on the initial order form prompts the customer to enter a delivery location value. If you enable cascading, the value for this variable then populates delivery location fields on each of the ordered items.
It works like- select the Cascade variables check box when creating the order guide. Then, create variables on the catalog items that match the names of the corresponding variables in the order guide. When a customer places an order, the variables on the ordered items inherit the values of the identically named variables in the order guide.
for script refer below link :
https://community.servicenow.com/community?id=community_question&sys_id=d398cb21db5cdbc01dcaf3231f961987
https://community.servicenow.com/community?id=community_question&sys_id=84f807a1db5cdbc01dcaf3231f9619ee
https://community.servicenow.com/community?id=community_question&sys_id=d5909369dbdcdbc01dcaf3231f9619eb
After going throw this mark it as correct/helpfull.
thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2019 08:41 PM
Hi Sasi,
I hope following link will help you
For difference between cascade variable and variable sets
https://docs.servicenow.com/bundle/london-it-service-management/page/product/service-catalog-management/concept/c_ServiceCatalogVariableSets.html
https://docs.servicenow.com/bundle/london-it-service-management/page/product/service-catalog-management/concept/c_ServiceCatalogVariableSets.html
For Script
https://community.servicenow.com/community?id=community_question&sys_id=2b0ecbaddb9cdbc01dcaf3231f961978
Mark Correct/Helpful, if this helps you 🙂
Regards,
Tejal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2019 08:53 PM
Hi,
variable sets:
Administrators and catalog administrators often define multiple catalog items that use the same group of service catalog variables. Catalog managers and catalog editors can attach a variable set for items and categories to which they are assigned. However, catalog managers and catalog editors cannot create a variable set.
For example, a catalog administrator defines 10 catalog items for types of servers. The request process for all these items asks the same five questions, using the same variables.
Associating these variables individually per catalog item is repetitive, time-consuming, and error-prone. Also, to make a single change to multiple catalog items involves manually changing each item. For example, to add a new variable to 10 catalog items, you would need to manually associate this new variable with each item.
Variable sets allow you to create a collection of structured variables that can be reused across multiple catalog items and order guides. Using variable sets saves time because you do not have to create the same variables individually for many catalog items. Also, when variables should be modified, you can modify the variable set and the changes are reflected across all the catalog items that are associated with the variable set.
Variable sets also allow you to define catalog client scripts and UI policies that are applicable to the variables in the set.
Cascade Variables:
Cascade Variables (once you will click on tick box) are used to allow functionality of using to same value into different catalog item by pulling from initial form.
Cascading allows values entered for variables in the initial order form to be passed to the equivalent variables in the ordered catalog items. For example, a variable on the initial order form prompts the customer to enter a delivery location value. If you enable cascading, the value for this variable then populates delivery location fields on each of the ordered items.
It works like- select the Cascade variables check box when creating the order guide. Then, create variables on the catalog items that match the names of the corresponding variables in the order guide. When a customer places an order, the variables on the ordered items inherit the values of the identically named variables in the order guide.
for script refer below link :
https://community.servicenow.com/community?id=community_question&sys_id=d398cb21db5cdbc01dcaf3231f961987
https://community.servicenow.com/community?id=community_question&sys_id=84f807a1db5cdbc01dcaf3231f9619ee
https://community.servicenow.com/community?id=community_question&sys_id=d5909369dbdcdbc01dcaf3231f9619eb
After going throw this mark it as correct/helpfull.
thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2019 08:56 PM
Hi Sasi,
Variable set is the collection of variable which can be used in multiple items.
cascade variable is a check box if you check that then the value of common variable is passed to multiple items.
For user detail you can write onChange catalog client script.
function onChange(control, oldValue, newValue, isLoading)
{
var caller = g_form.getReference('user_variable_name', doAlert); // doAlert is our callback function
}
function doAlert(caller) { //reference is passed into callback as first arguments
alert(caller.email);
alert(caller.name);
}