How can I interchange the columns Name and Email which are displaying in reference field on Portal

DP_3105_2
Tera Contributor

I am having this requirement where I have to interchange the columns name and email which are auto displaying when we click on reference field. I have tried with variable attribute but the name column always remains there. Please suggest some solution

 

DP_3105_2_0-1751964772163.png

 

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @DP_3105_2 

 

This is by design — the name appears first, followed by the email ID. Is there a specific reason you want to change it? Also, when you search, the system checks both fields simultaneously, so changing the order won’t make any difference.

*************************************************************************************************************
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]

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

Hi @GlideFather  I said same thing at first instance. 

*************************************************************************************************************
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]

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

GlideFather
Tera Patron

Hi @DP_3105_2,

 

If you want to simply change the columns order, then go to variable attribute (Last field in the Type specifications tab of your variable) and make it as you need:

ref_ac_columns=name;email

In this case it will be name, then email and you can switch or adjust

However it might get problems when searching for email and not name, in that case, try this: 
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=name;email,ref_ac_columns_search=true

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Ankur Bawiskar
Tera Patron
Tera Patron

@DP_3105_2 

it's platform behavior.

On sys_user table the "name" field is Display field so that will be always shown as 1st

You cannot change the position.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader