Multiple (Array) Items in Catalog Item

phsdm
Giga Expert

I have a three part question related to design and implementation of Catalog Items.   I am often asked to design an item which accepts "one or more" items.   For example one or more (name, phone number) pairs for a request to add lines to a phone.   The reasoning behind putting multiple entries on the form is to collect related work in one request item.

 

My questions:

 

1. Is this style of request supported better some other way?

2. The way I implement this is to create variables (name01, phone01, moree01), (name02, phone02, more02) .. (name08, phone08).   Is this the standard practice?

3. I have a short attention span, and find manual creation of these variables boring and error prone.   Do tools exist to help with this?

 

I started to write some scripts to help me with this.   One to "copy" up a variable.   Increment numbers in the variable name and question, and add 50 or 100 to the order.   Another to "copy" up a UI Policy along with its actions, incrementing any references to variables.   I thought I would stop and ask these questions in case:

 

A) Doing this is pointless because I should be using alternate techniques or tools.

B) Someone already has the perfect toolkit for doing this.

10 REPLIES 10

Brad Tilton
ServiceNow Employee
ServiceNow Employee

One of my favorite share apps is a table catalog item variable that I think would work well for your situation. It's features are:



Features:


- define and maintain variable table columns in a table accesible from the Service Catalog application


- define non-table fields which can be displayed before the variable table


- auto creates a variable set which can be added to any catalog item


- supports text, choice, checkbox, reference, date and datetime field types


- can define onchange functions for any column


- can allow multiple occurrences of the variable table to be created on the same catalog request order


- variable table is displayed on request items and catalog tasks and can be made read only


- can have variable table displayed in HTML emails



ServiceNow Share - Catalog table variable


Hi Brad,



Can you please let me know how to define onchange functions for any column. I am trying to pre-populate the catalog table varaible values when a number variable is changed. (Both number and catalog table variables are on record producer).



How to use catalog table variables in client script?



Thank you.


Hi @brad,



I believe Catalog Table variable creates macro and it is not getting rendered in the Service Portal. Is there any way, we can render this macro in the service portal.


UI Macros are not available in Service Portal. You'd have to reproduce the functionality in a service portal widget, then associate the widget with the ui macro variable through the widget field on the variable.