- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 01:46 PM
Alright, this is a wee bit complicated, but I'll try to explain as clearly as I can!
The problem:
We go to our Service Catalog under the Self Service module.
We open an item called "AR Recoveries Request". This is a typical service request form.
Items on the request form include the "Requested By", "Requested For", "Deadline", "Long Description", and "Relevant Contract" fields. Notice the lack of a "Short Description" field.
A user fills out these fields and clicks "Order Now".
A Request (REQ) is created. Inside the Request is a Requested Item (RITM). Inside the Requested Item is a Catalog Task (SCTSK). So in here lies the problem.
The "Short Description" field inside of the Catalog Task is defaulting to "Service Request - AR Recoveries Request". This is true although a short description is never asked for during the entire request creation process.
What we need:
1.) We need this field to stop defaulting to "Service Request - AR Recoveries Request".
2.) We need this field to display the information that is entered into a "Short Description" field on the "AR Recoveries Request" form. You see where I previously mentioned the lack of a "Short Description" field on the "AR Recoveries Request" form? We plan to add one there that we would like to sync with the "Short Description" field on the Catalog Task page.
Hopefully that was somewhat clear!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 08:12 AM
Then in the existing task activity code, you can add a check. Something like this should do
if(current.cat_item.getDisplayValue()=="your specific item name"){
task.short_description=current.variables.<short description variable name>;
}
else{
task.short_description = "Service Request - " + current.cat_item.getDisplayValue();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 02:29 PM
You do not need a run script activity for this. You can just add script to the existing create task activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 02:31 PM
Where exactly do I go to add script to the task creation activity?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 02:37 PM
When you open catalog task activity, you will see an Advanced chekbox. When
checked, you will see an advanced script section
On Tuesday, August 23, 2016, locke <community-no-reply@servicenow.com>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 02:53 PM
Alright, I found the relevant script. It currently looks like this:
task.short_description = "Service Request - " + current.cat_item.getDisplayValue();
So, this is a loaded question, but we need the Short Description field in the Catalog Task to sync with the Short Description field that will be added to the Service Catalog Request form (AR Recoveries Request). Will using the script posted above (task.short_description=current.variables.<short description variable name>;) allow us to do this?
I don't know if you can tell yet, but I'm still learning ServiceNow and am not exactly an accomplished scripter haha.
Thank you all for your help so far!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 05:31 AM
What is this script? Is it a global script? because if you modify this script, it will affect all the catalog items.
Will you be adding this short description variable in all your catalog items?