Users name to display in Short Description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2016 07:34 AM
Hello,
We have it set up so that a user can request a piece of hardware / software in ServiceNow Self-Service.
When they request this hardware / software, it is sent to their manager for approval and a call will be logged on out side stating 'Hardware Request for Joe Bloggs' in the short description. So it will display the users name.
Recently, I added some new hardware to the self service catalogue and it follows the same workflows as previous hardware requests, however the new hardware states 'Hardware Request for Undefined'
Does any body know how I can get it to display the users name like our previous hardware requests rather than it displaying 'undefined'?
Below is a screen shot of some stating the users name in the short description and some stating 'undefined'
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2016 07:48 AM
As chuck said, look in business rules on sc_request table and put in the filter script contains short_description.
Thanks,
Abhinay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2016 07:42 AM
Somewhere you have a business rule or other script that should say:
current.short_description = 'Hardware request for ' + current.requested_for;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2016 08:14 AM
Hi, I believe this is the script:
var gr_req = new GlideRecord('sc_request');
gr_req.addQuery('sys_id',current.request);
gr_req.query();
while(gr_req.next()){
//gs.log('found request'+ current.request.getDisplayValue());
var req = current.variables.full_name.getDisplayValue();
gr_req.short_description = "Hardware Request for " + req;
gr_req.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2016 08:19 AM
Hi John,
I think you've found it, but it is hard to tell what context this is running in. Can you also provide the value of the fields: Table and When?
I have a sneaky suspicion we can shorten this up to 1 line (the one I wrote before.)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2016 08:21 AM
John,
In the catalog item, variable "full_name" a reference field?
Thanks,
Abhinay