How to get Email Address of users in reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 04:30 AM
Hello All , My requirement is that I have to get Email Address of users in reference field and not name of the user. Any solution for this. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2025 05:03 AM
Hi @Gary Larsen
You can add javascript: gs.getUser().getEmail(); in the default value section in the variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 07:29 AM
Hello @Akshat8
please refer the below thread:
for this, you have to change the Display Value for the table, but it is not recommended as it would change for all the places user table used.
the best solution would be what Michael Jones suggested, but you have to change the variable type to lookup select box.
please hit thumb up below and mark the answer as correct if it helped!!
Regards,
Ravi Chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 12:36 AM
Hey @Ravi Chandra_K Thanks a lot for your help. I tried but how to remove the default value coming and the portal hangs very much with lookup select box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 02:15 AM
while you type you can show email address by adding variable attribute to that reference variable
add this in your variable attribute
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 05:05 AM