Set MRVS

servicenow14710
Tera Expert

Hello developers,

 I have a requirement to upload data from external source to mrvs , i could get the data into my Client script but unable to set the MRVS.

Appreciate if anyone can help. Thanks!

1 ACCEPTED SOLUTION

Daniel Borkowi1
Mega Sage

Hi @servicenow14710 ,

 

if I understood right you want to write data into the MRVS within the client script. You need to add the MRVS value as JSON object. Example:

 

 

//MRVS with 2 columns and 2 rows:
//Array of objects
var obj_array = [
 {
          "col_name1" : "value1_1", 
          "col_name2" : "value2_1"
  }, 
  { 
           "col_name1" : "value1_2", 
           "col_name2" : "value2_2"
   }
];
g_form.setValue("mrvs_variable_name", JSON.stringify(obj_array));

 

 

 Greets
Daniel

Please mark reply as Helpful/Correct, if applicable. Thanks!

View solution in original post

1 REPLY 1

Daniel Borkowi1
Mega Sage

Hi @servicenow14710 ,

 

if I understood right you want to write data into the MRVS within the client script. You need to add the MRVS value as JSON object. Example:

 

 

//MRVS with 2 columns and 2 rows:
//Array of objects
var obj_array = [
 {
          "col_name1" : "value1_1", 
          "col_name2" : "value2_1"
  }, 
  { 
           "col_name1" : "value1_2", 
           "col_name2" : "value2_2"
   }
];
g_form.setValue("mrvs_variable_name", JSON.stringify(obj_array));

 

 

 Greets
Daniel

Please mark reply as Helpful/Correct, if applicable. Thanks!