Where catalog variable's value are stored ?

Ashish Kumar Ag
Kilo Guru

Where the data were stored for Request Item catalog variables?

I want to fetch all the variables of request item in a single field by comma separated .

 

Thanks,

solutioner nowBhavesh Jain

1 ACCEPTED SOLUTION

Sanjeev Kumar1
Kilo Sage

Hi,


If you want to access all variable related to any request item use following Script.



var item = new GlideRecord("sc_req_item");


  item.addQuery("request", requestSys_id);


  item.query();


  if (item.next()) {


// grab all variable sets from the parent request


    var var_own = new GlideRecord('sc_item_option_mtom');


    var_own.addQuery('request_item', item.sys_id);    


    //var_own.addQuery('sc_item_option.item_option_new.u_approval_display', 'global');


    var_own.orderBy('sc_item_option.item_option_new.order');


    var_own.query();      


   


    while (var_own.next()){


         


            gs.print(var_own.sc_item_option.item_option_new.question_text + ": " + eval('item.variable_pool.'+var_own.sc_item_option.item_option_new.name+'.getDisplayValue()') + "\n");


      }


     


    }



Thanks,


Sanjeev Kumar


View solution in original post

10 REPLIES 10

Hi,

I am trying to copy all variables on RITM to description field on incident table. I am trying the below code but it is copying only one variable though RITM has more than one variable.

Please help me.

var item = new GlideRecord('sc_item_option_mtom');
item.addQuery('request_item',current.sys_id);
item.orderBy('sc_item_option.item_option_new.order');
item.query();
while(item.next()){
inc.description = item.sc_item_option.item_option_new.getDisplayValue() + ":" +eval('current.variable_pool.'+item.sc_item_option.item_option_new.name +' .getDisplayValue()')+ "\n";
}

 

Thanks,

VC

Hi Sanjeev,

 

When using multi row variable set, it is displaying undefined values. Do you have a solution for that ?

 

Sanjeev Kumar1
Kilo Sage


Hi Ashish,


If this solution work for you please mark it as Answerd.


Thanks,


Sanjeev Kumar


Hi Sanjeev ,


I have the same problem,   and I don't know where the variable's value are stored ...i need to export data from this form to another form


can you help please?


find_real_file.png


Hi Emy,

 

You need to copy data from one form to another ?

Or you need to create a reprt on same.

 

Thanks,

Sanjeev Kumar