Order guide variables to be passed to sc_request

ramak
Giga Expert

Hello folks, is it possible to pass the variable values given during the first stage of an Order Guide to the subsequent service catalog request(sc_request) that gets created ?

This is for a New Starter order guide which has a few variables like Department/Business/Start Date/Emp type etc., which do not have an associated catalog item. Is there a way to see all these variables on the REQ form that gets created from this order guide ?

Any thoughts on this please ?

14 REPLIES 14

Jace Benson
Mega Sage

If I recall correctly, the variables for the order guide if they don't pass down to the subsequent items, they are not accessible.   So if you wanted to do this, you'd have to pass the values down to at least one item, then write up to the request from either the workflow or a business rule on sc_req_item.


Can you pls elaborate on that mate ?


I mean, the order guides variables aren't stored anywhere like catalog items are.


So to do this you'd have to add variables to at least on of the items, then in the workflow write run script, or on sc_req_item, write a business rule that effectively does;


var req = new GlideRecord('sc_request');


if(req.get(current.request)){


      req.u_field = current.variables.deparment


      /*


      etc


      etc


      */


      req.update();


}


randrews
Tera Guru

the easiest way to do this is to put the variables you wnt to pass from the order guide to the items into a variable set and mark them as global...



now add the variable set to BOTH the order guide AND the item... they will automaticly cascade from the order guide...