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

jdestef
Tera Contributor

from what I see (and experienced) sc_item_option.value has a limit of 4000.