- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2018 08:29 AM
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!
Best regards,
cnharris
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2018 08:33 AM
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();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2018 08:33 AM
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();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2018 09:16 AM
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2018 09:45 AM