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

phsdm
Giga Expert

Brad, we just stood up our sandbox instance so I am finally going to take Catalog Table Variable for a spin.   I have high hopes.   Thank you for pointing this out.  


Brad Tilton
ServiceNow Employee
ServiceNow Employee

No problem. Let us know how it goes.


About to try this. Something I've always wanted to do.


Hi Brad,



Can you share the syntax on how to parse through the entries in this variable set? I've been unable to figure out how to make a column in the same row mandatory based on the value of a different column in the same row. I'd also like to be able to parse out the details into a field on the associated table, for viewing/reporting purposes.



Thank you - this tool will be really handy with the knowledge to do these things.


merbs
Mega Contributor

Did you ever receive the syntax to parse through the variable set?