Referencing the sys_user email address

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2011 11:48 AM
How would I create a reference variable that is referencing the email address from the sys_user field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2014 01:08 AM
Hi All,
Three ways possible here:
- Add the attributes for the reference field like below which will show only email address in the auto-complete feature. However, still the display value will be the Name of the user.
ref_auto_completer=AJAXTableCompleter,ref_ac_display_value=false,ref_ac_columns=email;
- Personalize the Form layout and bring the Caller.Email field to the form. (Not possible for catalog variables)
- Write an onChange client script or catalog client script(for catalog variables) to set the Email field with User's email based on Caller.
Thanks,
CK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2014 01:47 AM
Thanks CK.
I just wonder how do I bring the Caller.Email field to the form?
I know there is an email field in the sys_user table, however, that's not available on the incident form layout.
Hence, I created the custom email field (u_email) on the form. Is it a best way to have the email field?
Many thanks
Eddie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2014 02:20 AM
Hi Eddie,
Check this link Personalizing Forms - ServiceNow Wiki and select the Caller field and click on Add icon (highlighted in the Screenshot below) to display the sys_user table fields. Then select the Email field to add it to the viewable slushbukcet and save it. You would be able to see the field in the Form layout.
Thanks,
CK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2014 02:22 AM
Hi Eddie,
Yes, this is the best way to have the Email field in the Form layout (Make it readonly if you wish user should not modify it). You might have to delete the custom field u_email created.
Thanks,
CK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2014 01:16 PM
Eddie if you want to be able to change it every time, without changing the actual user record the best bet is to add a string field called email and use the client I posted above