Populating Reference fields

eromanek
Tera Contributor

Hello,

 

I added a reference field (u_email_address) to the Incident form referencing the sys_user table so I can lookup/pull info from the User table's email address field (email).   I used the below attribute on the email address field on the Incident form and although the email address shows, only the name populates the email address field and not just the email address.  Any suggestions?

 

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name,ref_ac_columns_search=true,ref_ac_display_value=false

 

eromanek_0-1706899221577.png

 

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Try with @eromanek 

 

LearnNGrowAtul_0-1707062663278.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

servicenow us12
Giga Contributor

Hello @eromanek ,

 

Kindly use below attribute for the reference field  (u_email_address) so that you will be able to see user id, email and name of the user in auto-suggestions

 

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name;email;name,ref_ac_columns_search=true,ref_ac_display_value=false

servicenow us12
Giga Contributor

hello @eromanek ,

 

update the attribute ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name;email;name,ref_ac_columns_search=true,ref_ac_display_value=false

Jyoti Jadhav9
Tera Guru

Hi @eromanek ,

You can add email while searching using the "ref_ac_columns" attribute, but when you actually select that user, it will only show/select the name of the user in the Reference field.

If you want to show the email on selection as well, you will have to make the "email" field as Display(Display Column value = true) for the user table which is not recommended.

Jyoti4_0-1707147857364.png

Please hit the like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

 

Thanks & Regards

Jyoti Jadhav