Populate REQ description with catalog variables

cnharris1
Kilo Sage

Hello everyone,

I'm working on building out our Service Catalog Items. In the main workflow that builds out the REQ tickets for the Catalog Items, I'm setting all the values once the ticket is created. However, I want to set the values of the variables the user chooses in the description. I know I can accomplish this using a script include how I might a write the script to make it dynamic with the catalog item and the variables the user chooses? I have included a screenshot of where I'm trying to set the values in the workflow:  Any help will be greatly appreciated!find_real_file.png

 

Best regards,

 

cnharris

1 ACCEPTED SOLUTION

Mike Patel
Tera Sage

On your request item workflow add run script activity 

Name: Update Request

Script:

//Set Parent Request Short Description//
var reqParent = current.request.getRefRecord();
reqParent.description= current.variables.XXXXXX;
reqParent.autoSysFields(false);
reqParent.update();

View solution in original post

3 REPLIES 3

Mike Patel
Tera Sage

On your request item workflow add run script activity 

Name: Update Request

Script:

//Set Parent Request Short Description//
var reqParent = current.request.getRefRecord();
reqParent.description= current.variables.XXXXXX;
reqParent.autoSysFields(false);
reqParent.update();

Thanks Mike, that worked! I have one more question, if I have multiple variables that I want to display along with their questions, will I have to set up an array in the script?

vinothkumar
Tera Guru
One more factor you have to consider is that single REQ may have multiple RITM'S