MRVS Table to another MRVS table Value transfer

win b
Mega Guru

Hi. Im kinda lost in here when it comes to MRVS. but i know this is only a simple task but i cant solve the problem. The thing is i have 2 MRVS table inside my catalog which holds my values for permanent and temporary tables. but i cannot get my values from my first MRVS table and my code is not working as of the moment.

basically upon submission my first MRVS table with values will transfer it to my second MRVS table its like a copy from my first from what user filled up after submitting. then in the RITM side the first MRVS table values should be cleared and transfered the value to my second MRVS.

find_real_file.png
find_real_file.png

 

 

1 ACCEPTED SOLUTION

Hi,

update as this

var jsonString = current.variables.all_star_list; // temp mrvs (no read permission)

var arr = [];

var j = JSON.parse(jsonString);

for (var i=0; i<j.length; i++) {
	arr.push({"vs_domain2" : j[i].vs_domain, "vs_release_comp_status2" : j[i].vs_release_comp_status, "vs_date_issued2" : j[i].vs_date_issued, "start_d2" : j[i].start_d, "end_d2" : j[i].end_d}); // creation of mrvs object
}

current.variables.all_star_list2 = JSON.stringify(arr);

current.variables.all_star_list = '';

Regards
Ankur

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

View solution in original post

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can do this

1) keep variable names same in both the MRVSs

2) then use workflow run script in your catalog item's workflow to copy

current.variables.all_star_list2 = current.variables.all_star_list;

Regards
Ankur

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

win b
Mega Guru

you mean like this ? find_real_file.png
when i tried it on my end it doest get my valuesfind_real_file.pngfind_real_file.png

Hi,

when do you want the values to be copied over?

once RITM is submitted?

Regards
Ankur

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

win b
Mega Guru

when the user submitted the request. in RITM side the second MRVS should be populated with the same value from the first. then the first MRVS table should be cleared