- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 07:55 AM
Hi,
I'm looking for the possibility to change the short description of RITM's once the user requests specific items. I was looking at options for the workflow, but the workflow I'm using only allows to change the Catalog tasks.
In another topic it showed the solution should be by adding the following script to the Catalog task core activity. This didn't work for me.
current.short_description = current.variables.requested_item;
Is there maybe a specific core item I can add to the workflow? I have attached a screenshot of the current workflow. This workflow is being used for multiple catalog items.
Regards, Quinten
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 04:09 PM
I wouldn't put it in the Catalog Task script, I'd make a separate runscript activity that fires as the first activity. In the workflow you've shown (assuming you put the script in the Catalog Task), it won't take effect until its Approved (if its not approved, it won't happen at all).
Secondly, the first part of the script you listed is right, but who knows about hte second part.
What *Precisely* do you want to set the RITM short_description to? The script you show there assumes there's a variable called "requested_item". No variable, no short_description change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 04:09 PM
I wouldn't put it in the Catalog Task script, I'd make a separate runscript activity that fires as the first activity. In the workflow you've shown (assuming you put the script in the Catalog Task), it won't take effect until its Approved (if its not approved, it won't happen at all).
Secondly, the first part of the script you listed is right, but who knows about hte second part.
What *Precisely* do you want to set the RITM short_description to? The script you show there assumes there's a variable called "requested_item". No variable, no short_description change.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 04:35 PM
After begin add run script activity and add below
current.short_description = current.cat_item.getDisplayValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 07:32 PM
That really begs the question though: Why make the short description the same as the display value of the item reference on the same record?
I've always used a run script activity in the workflow to craft a precise short description based on a combination of variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2018 02:30 AM
Hi Robert and Mike,
Thanks to your replies I managed to do what I wanted to do.
I created the following run script before manager approval:
if (current.cat_item.getDisplayValue() == 'Generic Request') {
current.short_description = 'GR: ' + current.variables.requested_item;
}
The reason I wanted to use this function is because the catalog item is a Generic Request. Due to the high variety of requests this catalog item is used quite often. This results to if we look into our requested items list, we find many requests where the description if the request items is just the generic one. There is a variable in called "requested_item" which is input by the users describing the item they request.
Adding this to the script allows a better overview of requests for both the customers in the service portal as for the itil users in the backend.