How to map multi row variable set from record producer to case form

Renu9
Tera Contributor

How to create multi row variable set in the case form. It has to be with 3 columns and n number of rows on addition. 

Could anyone please suggest how it can be created in case UI .

Ankur Bawiskar
Tera Patron

Hi,

So if MRVS has 3 rows and each row has 4 columns so where it should be mapped?

Regards
Ankur

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

Hi Ankur, it has to be mapped in the case form to a table field.

In record producer, im having as below.

find_real_file.png

In the same way, this has to be copied into the case form UI when we hit the submit button from record producer.

Hi,

yes but date and incident/Details should be mapped to which fields in target table?

please share which target fields image to be set and also as there are 2 rows what about the other row?

Regards
Ankur

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

@Renu 

you can use this to populate name-value pair

Sample below

var arr = '[{"variable":"jm_template_variable","type":"xlrelease.StringVariable"},{"variable":"jm_template_var2","type":"xlrelease.StringVariable"},{"variable":"jm_date","type":"xlrelease.DateVariable"},{"variable":"jm_boolean","type":"xlrelease.BooleanVariable"},{"variable":"jm_array","type":"xlrelease.ListStringVariable"},{"variable":"jm_integer","type":"xlrelease.IntegerVariable"}]';

var parser = JSON.parse(arr);

var obj = {};

for(var i=0;i<parser.length;i++){
obj[parser[i].variable] = parser[i].type;
}

g_form.setValue('u_name_value', JSON.stringify(obj));

Output:

find_real_file.png

Regards
Ankur

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