How to get Email Address of users in reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 06:14 AM - edited 05-07-2025 06:14 AM
Hi @Ankur Bawiskar
I want to display the email id value of the users instead of the name of the user .
I have created one field as email id which is referencing to sys_user,but when i am selecting the email id its displaying the user name .
As you suggested to use the variable attributes i used it ,but after that all the value are hidden .
Have attached the screenshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 06:21 AM
when you use ref_ac_columns then when the users types it will show email, but once user is selected it will always show name of that user.
Reason: name field on sys_user is display
Why not have another single line text variable to store the email and auto populate that whenever User is selected in reference variable?
You can use auto populate feature available starting from Utah without scripting
Auto-populate a variable based on a reference type variable (Utah)
OR Another way
1) to use Lookup Select box variable with this config and it will show always Email
If my response helped please mark it correct and close the thread so that it benefits future readers.
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 06:33 AM
Hi @Ankur Bawiskar
I tried the way you suggested ,but its not showing all the email which are there in the sys_user table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 06:37 AM
all users in sys_user have email?
use this and it showed me all emails
1) don't give anything in variable attributes
2) don't give anything in Lookup label fields
Output:
If my response helped please mark it correct and close the thread so that it benefits future readers.
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 06:43 AM
Hi @Ankur Bawiskar
Yes all the user have email in sys_user table
Have the attached the scrrenshot.