copy the same variable editor from one RITM to another RITM. i am creating multiple RITM's with single request, so for first RITM it is automatically coming from second i need this variable editor.

Sai25
Giga Guru

Hi Team,

 

i am trying to copy the same variable editor from one RITM to another RITM. i used "com_glideapp_servicecatalog_veditor" but it is not working.The variable editor is getting in the RITM0012247 but i need the same in RITM0012248.

find_real_file.png

find_real_file.png

 

 

could you please help me with this scripting in workflow activity - Run Script.

 

 

var listStr =current.variables.select_user.toString();
var list = listStr.split(',');

if(list!=''){

for (var i = 0; i < list.length; i++) {

var ritm = new GlideRecord('sc_req_item');
ritm.newRecord();
ritm.request = current.request;
ritm.cat_item=current.cat_item;
ritm.opened_by=current.opened_by;
ritm.due_date=current.due_date;
workflow.scratchpad.com_glideapp_servicecatalog_veditor=current.com_glideapp_servicecatalog_veditor;
ritm.insert();

}
}

 

Thanks,

Sai.

6 REPLIES 6

scott barnard1
Kilo Sage

are you using a order guide to generate the multiple RITM's?

Hi Scott,

 

this is for catalog item and i am using workflow to generate RITM's.

 

Thanks,

Sai.

scott barnard1
Kilo Sage

If you are trying to update values in a workflow you will need to write those values to the scratchpad after they are created then on each new ritm populate the variables from the scratch pad.

If you were using an order guide you just tick the cascade variables tick box and ensure that the variables on each item have matching names. If they do every item created as part of the order guide contains the same variable values that the order guide has.

regards

Hi Scott,

 

I am writing the below script to create multiple RITM.

 

Can you please tell me how to write the code to copy the variable editor.

 

find_real_file.png