How to Clear MRVS Values in a Copied Catalog Item Request?

ZackZ
Tera Contributor

I have a catalog item in ServiceNow that includes a Multi-Row Variable Set (MRVS).

When a user duplicates a request using the "Copy" function, I want to automatically clear the values inside the MRVS fields in the copied request.

Could someone guide me on how to achieve this? Is there a way to use UI Policies or another method to reset the MRVS values specifically when the request is copied?

 

Thanks in advance for your help!

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

I'm not familiar with the "Copy" function - that could be something specific to your instance.  Is this initiated from the Request form, REQ, or RITM?  When the request is copied, is the new/duplicate record displayed?  If so is it the new Request form, REQ, or RITM record?  If the new Request form is being displayed you can try

g_form.clearValue('mrvs_internal_name');

or

 g_form.setValue('mrvs_internal_name', '');

in an onLoad Catalog Client Script that only Applies on a Catalog Item view.  Otherwise it should be possible to incorporate this into the copy UI Action or a Business Rule.  Post your UI Action script along with the above and we'll get it sorted.