- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2016 01:31 PM
How can I display the first name, last name, and email address in the Name column for the user table. Currently the the requested for variable is referencing the users table and displays the name field which only has the user's first and last name. The issue we are having is that we have some users with the same name and the end user submitting an incident or request cannot distinguish which person to choose. I do not have a good grasp at scripting so any help would be great.
Here is what we have for the script for the name column:
if (current.first_name.nil() && current.last_name.nil() && !current.name.nil()) {
var names = current.name.toString().split(" ");
if (names.length > 1) {
current.first_name = names[0];
names.shift();
current.last_name = names.join(" ");
} else
current.last_name = names[0];
}
if(current.first_name.nil()) {
current.last_name;
} else {
current.first_name + ' ' + current.last_name;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2016 05:00 AM
I was experiencing the same display discrepancy between the Service Catalog and ESS, and the new Service Portal until I made my Variable attributes the following:
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true,ref_ac_order_by=name
The search and order by may not be necessary. Now I am seeing name and email in the reference drop-down - though it seems to stack the email address beneath the name, not to the right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 07:45 AM
Hi Arturo,
Did you get the solution for this to append the concatenation of the first name, last name, and email fields together in the Service Portal search ????
Please let me know if you have something on this.
Thanks,
Prajwal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 11:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2018 02:10 AM
Hello, Where can I find this page? I'm beginner in servicenow thanks for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016 11:34 AM
Hi Brad,
That is correct i want the name to be a calculated field which concatenates the first name, last name, and email fields together in the Service Portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2016 05:00 AM
I was experiencing the same display discrepancy between the Service Catalog and ESS, and the new Service Portal until I made my Variable attributes the following:
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true,ref_ac_order_by=name
The search and order by may not be necessary. Now I am seeing name and email in the reference drop-down - though it seems to stack the email address beneath the name, not to the right.