- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2014 09:38 AM
Hi folks,
I have created a new Service Catalog item called 'HR - Recruitment Requisition Form' (maintain items)
I have it workflowed to create a HR ticket and embed the variables of the catalog form into the ticket.
Is there a way to pull the info from a field on the form and set it as the short description?
I have set up a template called 'HR Recruitment Requisition Form' and been able to set the caller id on the ticket by adding 'javascript:gs.getUserID();' to the 'Caller ID' field on the template.
Is there a similar way to add such a script to the short description field. for example we would like to add the field info from the variable 'position_title' on the service cat form and onto the short description of the ticket.
I have attached a printscreen of the template set up. is there a way to add a script in here?
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 05:46 AM
if position_title is the name of the variable on the record producer, try
current.short_description = producer.position_title;
in the script area of the record producer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2014 12:04 PM
To clarify, is the entry on the service catalog making RITMs that have a workflow that makes [hr] table records? (I wasn't sure from the original post but I assume so since you mentioned maintain items)
If you don't really need the RITM you could try using a record producer to create the record directly on the [hr] table
Record Producer - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 02:20 AM
Hi, thanks for the reply,
The variables are entered into a record producer and when submitted it embeds the variables into a HR ticket (instead of a Request or RITM). We are trying to add the info entered into the position_title field (below) into the 'Short Description' field on the actual ticket if thats possible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 05:46 AM
if position_title is the name of the variable on the record producer, try
current.short_description = producer.position_title;
in the script area of the record producer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 06:19 AM
as an alternative you could also add a short_description field to the catalog item, and possibly a description field
then you can use an on submit script to add whatever variables you want to the short and long descriptions...
for example
short_description += g_form.getValue('position_title');
if you don't want the customer filling in the short or long descriptions on the cat item.. just hide them via policy and update with the on submit script.