- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2020 08:59 PM
Kindly help in how to add Clone or Copy action button for Variable Set in Record Producer.
I need to copy the records or values of one row of variable set and create a new row entry in same variable set. this action must happen before submission of main record producer.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2020 09:34 PM
Hi Nirmala,
you will have to use some custom code to copy; or else what you can do is use onSubmit catalog client script and set the mrvs value as below
One more option is to have a macro variable and have button name as Copy; on click of it get the value; and copy
function onSubmit(){
var value = g_form.getValue('mrvs_variable');
var parser = JSON.parse(JSON.stringify(value));
var obj = parser[0];
arr.push(obj);
g_form.setValue("mrvs_variable",JSON.stringify(arr));
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2020 01:44 AM
Thank you Ankur. I will try with this solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2021 07:14 PM
Hello Nirmala,
Are you able to implement a third 'Copy' button?