Service Catalog: Variable Sets and Why You Should Use Them

    Service Catalog: Variable Sets and Why You Should Use Them

    The variable set functionality within ServiceNow is one of those features you should be using for every catalog item in your service catalog right from the very beginning. However, this is usually a realization that dawns on most people WELL AFTER you have implemented more catalog items then you probably care to admit. Do not worry though, I promise that you are not alone in this realization.

    So... variable sets, what are they and why do they matter?

    What Variable Sets Are

    Variable sets are, quite simply, a collection of variables, catalog UI policies and catalog client scripts that you can build independently of a specific catalog item.

    Why They Matter

    Once you have created a variable set, you can reuse it in as many catalog items as you want without having to recreate those very same variables, catalog UI policies, or catalog client scripts ever again. Here are two of the biggest benefits when it comes to using variable sets:

    1. They reduce the time to create a new catalog item due to reusing existing variables, catalog UI policies, or catalog client scripts that are common across multiple catalog items.
    2. They simplify the process of making a change to a variable, catalog UI policy, or catalog client script used across multiple catalog items due to having to make the change only once in the variable set.

    Working with Variable Sets, an Example

    Let us envision for a moment that we are designing some server related catalog items and we built three variable sets that we plan to reuse across all of them.

    The first variable set is one that contains the most common variables you might have to create for the requester such as name, location, contact information, etc. It may look something like this:

    • Employee Type: (select box)
      • New Employee: (select box choice)
        • First Name? (single line text)
        • Middle Initial? (single line text)
        • Last Name? (single line text)
        • Phone Number? (single line text)
        • Manager? (reference)
      • Existing Employee: (select box choice)
        • Request User/Employee? (reference)
      • Either Option: (UI policy)
        • Best Contact Method: (select box)

    The second variable set contains typical server attributes you might have to provide if requesting something related to a server. It could look something like this:

    • Server Type: (select box)
      • Existing server: (select box choice)
        • Server? (reference)
      • New Server: (select box choice)
        • Virtual or Physical? (select box)
        • Processor Count? (select box)
        • Operating System? (reference)
        • RAM? (select box)
        • Drive Space? (select box)
      • Either Option: (UI policy)
        • Datacenter? (reference)
        • VM Host? (reference)

    The third and final variable set is for any additional requirements, information or comments that the person submitting the request might have that are not covered by any other variable sets. It might look something like this:

    • Additional request details or requirements? (multi-line text)

    With the above three variable sets in mind, here are some simple server related catalog items that could be built using some catalog item specific UI policies and without the need to create any additional variables:

    • Report an Issue with a Server
    • Provision a new Server
    • Modify an Existing Server
    • Migrate an Existing Server
    • Decommission an Existing Server

    With a bit of planning and design, the possibilities are endless as to how you can slice, dice and reuse variable sets in the most effective way for your organization.

    Official ServiceNow Documentation for Variable Sets:

    Kingston Release - London Release - Madrid Release

    To find about GSI’s ServiceNow Services, call us at 855-GSI-4ERP or click on CONTACT US to send us a request for more information.