I have to copy the MVRS table data to the form UI MVRS table

Ashfaq Naina A
Tera Expert

I have to copy the MVRS table data to the form UI MVRS table, basically what need to acheive is when you select a closed RITM from the dropdown it will auto fill the details from the old RITM and complete the form, but the form have a MVRS that also need to auto populate, please help...

 

 

2 REPLIES 2

Murthy Ch
Giga Sage

@Ashfaq Naina A 

Yes, you can also copy the MRVS data into the catalog item from the existing RITM mrvs data just by simply returning the mrvs object with mrvs internal name as it will return the data in array json and you can just simply set the value in your client script with same mrvs name.

Sample response looks like:

[ {
  "device_type" : "iphone8",
  "storage" : "64GB",
  "color" : "black",
  "quantity" : "1"
} ]

in you CS: 

g_form.setValue('mrvs_internal_name', obj); //obj you returned from your script include and replace with actual mrvs internal name

Share your existing CS, so we can modify the same.

Thanks,
Murthy

Ankur Bawiskar
Tera Patron
Tera Patron

@Ashfaq Naina A 

so you can use onChange catalog client script on your reference variable and bring the MRVS json data and set it

what did you try so far and where are you stuck?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader