Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Chalan B L
Giga Guru

 

We always come across a common requirement for catalog items to add a table to record more than one value in a spreadsheet format. We usually go through a lot of trouble trying to build an UI page/macro from scratch and the process to paste all the values back into the RITM is also a tiring process altogether. ServiceNow has finally addressed this issue with a new feature called the multi row variable set.

 

Sample Multi row variable set:

find_real_file.png 

find_real_file.png 

 

Auto-Populating rows on this variable set:

There was a requirement in one of our engagement to populate the list of assets into the RITM for update/retire but as an approver or a fulfillment user they would need more than just the name of the asset in the list collector on  the RITM. To tackle this, we have created a multi row variable set to populate the Serial Number, Model Category, Model & State values of the respective assets selected in List collector variable automatically using an ‘OnChange’ client script. Attaching script and more details since it isn’t the usual approach.

 

Select an asset in List Collector:

 find_real_file.png

 

 

Asset selected in List collector is auto populated with all the values in Multi Row variable set:

find_real_file.png

 find_real_file.png

 

Please find attached script to auto populate values of asset selected.

Note: You cannot set Global as ‘True’ for multi-row variable set variables and variables will be shown only on RITM but not on Catalog task.

Please refer below link to know more details on multi row variable sets:

https://docs.servicenow.com/bundle/london-it-service-management/page/product/service-catalog-managem...   

 

Please mark the answer as helpful and if it helped bookmark it..!!!

 

Thanks & Regards,

Chalan

Comments
Robbie
Kilo Patron
Kilo Patron

Thanks Chalan. I had a slight variation in requirements but your code above definitely helped and saved time/effort on my side. Thanks - appreciated.

Shamilli
Tera Contributor

Hi Chalan,
 On basis of your code I have a multi-row variable set to auto-populated for assets assigned based on the user. I have another list collector field (Asset Reference) which is in a single row variable set and has a reference qualifier to show assets assigned to the above selected user.

The issue i am having here is for some users this List collector  works perfectly fine and for some users the reference just keeps loading and never gives back the assets even though there are only 2-3 assets. Not sure what can be done to get the desired results for all users.

But the List collector is working perfectly fine for all users, when disable the Multi-row variable set from the catalog item.

Mitch16
ServiceNow Employee
ServiceNow Employee
Akash Srivastav
Kilo Contributor

THANKS !! Very well explained. 🙂

Bharath38
Giga Sage
Giga Sage

Anyone tried other way round, like populating List collector based on MVRS values. List collector in portal don't give much info for selecting records, we are trying to let users fill info in Mvrs variables and our client scripts will read data and add records to list collector.

Riya Garg1
Tera Contributor

Hi Chalan B L,

I am not able to find attached On change Client script as you mentioned "Please find attached script to auto populate values of asset selected." can you please provide a sample for it. It would be really appreciable.

Thanks!

Neeta1
Tera Contributor

Thank you so much.

Praseena
Tera Contributor

Hi , all. I tried the same and it is getting populated as empty values. Could some one help me wth the same

Version history
Last update:
‎02-18-2019 11:37 AM
Updated by: