- 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-29-2020 12:50 PM
Hi,
Can this be achieved if the field is a choice field (drop-down with None)?
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 08:36 AM
did you find any solution for changes in calculated value?