Multi Row Variable Set Access Values

Anubhav24
Mega Sage
Mega Sage

Hi All,

Can some one guide me on how to access MRVS variables with multiple rows in both client side and server side.

 

Thanks in advance

6 REPLIES 6

Sandeep Rajput
Tera Patron
Tera Patron

@Anubhav24 Please refer to this article https://www.servicenow.com/community/itsm-articles/scripting-with-a-multi-row-variable-set-and-a-pos... from Brad to know how server/client side scripting can be applied on a multirow variable set .

 

Hope this helps.

NIRANJAN S2
Tera Contributor

The variables are stored in "multi row question answer(sc_multi_row_question_answer)' table you can query and use that using glide record, consider the computation time if its being used frequently. 

@NIRANJAN S2 

Do you think doing a GlideRecord will incur more computation time than just accessing it in client side and deciding the logic ?

Anubhav24
Mega Sage
Mega Sage

Hi All,

I used below solution :

 var mrvs_value = g_form.getValue('MRVS Variable name'); // name of the MRVS
        var jsonobj = JSON.parse(mrvs_value);
        var length = jsonobj.length;
        for (var i = 0; i < length; i++) {

            if (jsonobj[i].deletion == 'true') { //to access variable values

                count++;
     
            }
        }