- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2014 03:04 PM
I feel like my coworker and I have tried every script we can possibly think of!!
We are using the Advanced Script in a Workflow Catalog Task to try to pull the Requested Item into the Short Description of the task.
For example, If I were to go into Service Catalog and select Hardware (Category), then Select and order a Laptop (Item), I would like the tasks created by the workflow to contain "Hardware Request Validation - Laptop" in the Short Description field.
We've tried using:
task.short_description = "Hardware Request Validation - " + current.request.requested_item and we have tried using multiple varieties of this script line including replacing .requested_item with sc_req_item and sc_cat_item along with adding .name to the end of the string to, but to no avail, it just keeps coming in as - undefined.
Any help on this is much appreciated!!
Thank you!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2014 03:13 PM
If you're trying to get the name of the Catalog item then you should use:
task.short_description = "Hardware Request Validation - " + current.cat_item.name;
task refers to the catalog task that is being created. current refers to the requested item. current.cat_item is the catalog item (i.e. form that they just filled out).
If you are instead looking for the requested items short description or something like that you can just use current.short_description.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2014 03:13 PM
If you're trying to get the name of the Catalog item then you should use:
task.short_description = "Hardware Request Validation - " + current.cat_item.name;
task refers to the catalog task that is being created. current refers to the requested item. current.cat_item is the catalog item (i.e. form that they just filled out).
If you are instead looking for the requested items short description or something like that you can just use current.short_description.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2014 03:14 PM
Great minds think alike James Farrer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2014 03:26 PM
Your script was bang on!!!
Using: task.short_description = "Hardware Request Validation - " + current.cat_item.name; worked!!
When I tried it almost exactly the same except with current.sc_cat_item.name, it would state "undefined", but your script suggestion worked!!! Thank you so much!! It felt like we had tried every variation we could think of!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2014 03:13 PM
This should do the trick:
task.short_description = "Hardware Request Validation - " + current.sc_cat_item.name;
"current" refers to the sc_req_item table you are running the Workflow on and "sc_cat_item" points back to the catalog item that was ordered, and "name" is of course the name of the catalog item.