Setting the 'Requested for:' of a Service Request from a VariableDescriptionOut of the box, when a user submits a Service Request, both the 'Requested For' and 'Opened by' will be set to the user submitting the request, (the current user logged on). A customer may want to give the requester the option of submitting the Request on behalf of someone else. In this case, a new 'Requested for' Variable is created and added to a Catalog Item. But that is only the first step. You still need to get the value form the new Variable to the 'Requested for' field on the parent Service Request. This article shows you one way to do this. ResolutionThis process involves two components: A Script Includes used to set the 'requested_for' field on the Service Request table, (sc_request).A Catalog Client Script which will call the the Script Includes listed above and pass the necessary parameters. In the example below, a Variable has been created named, 'Requested_For' which is a reference field to the User table, (sys_user). Note that you can call the Variable anything you want, you will just need to modify the Catalog Client Script with the correct Variable name. NOTE: You do not need to change the name of the variable in the Script Includes, just the Catalog Script. Build the script includes Go to System Definition > Script Includes and click New Name = CartRequestFunction Both Active & Client Callable should be checked. Script: var CartRequestFunction = Class.create();CartRequestFunction.prototype = Object.extendsObject(AbstractAjaxProcessor, {cartRequestFunction: function () {var requestedFor = this.getParameter('sysparm_requestedFor');var cart = new GlideRecord('sc_cart');var userid = this.getParameter('sysparm_currentUser');cart.addQuery('user', userid);cart.query();if(cart.next()){// Update Requested for in the cartif (cart.requested_for != requestedFor) {cart.requested_for = requestedFor;cart.update();}}}}); Build the Catalog Client Script Go to Service Catalog > Catalog Policies > Catalog Client Scripts and click New Name = Set Requested_for from Variable Appliies To: This can either be applied to a Varaible Set, or a Catalog Item. It depense where you have the 'Requested_For' Variable. Variable Set/Catalog Item: Specify where the 'Requested_For' Variable resides. Active is checked Type = onSubmit Applies To: This should only apply to Catalog Item View. Script: function onSubmit() {if (g_form.getValue('Requested_For') != ""){ var ga = new GlideAjax('CartRequestFunction');ga.addParam('sysparm_name', 'cartRequestFunction');ga.addParam('sysparm_requestedFor', g_form.getValue('Requested_For'));ga.addParam('sysparm_currentUser', g_user.userID);ga.getXMLWait();}} //Highlighted in yellow above: this is where you would change the script to use your variable if the name is different.Additional InformationRememember that the Requested For gets stored in the parent Service Request, (REQ). The variable is on the Catalog Item, which relates to the Requested Item, (RITM). You can have multiple Request Items, (RITM), for one Service Request, (REQ). This scenario works best when you only have one RITM for one REQ. If you have multiple RITMs, then you run the risk of the second RITM overwriting the Requeted For, if they were different.