- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2019 06:10 AM
How to change search key in Reference/List field on Service Portal?
By default, search key is name of user, but I want to search by user id.
Solved! Go to Solution.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2019 06:14 AM
Hi,
In the reference field attributes, please add the line
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name,ref_ac_columns_search=true,ref_ac_display_value=false
This will allow you to search on user_name.
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2019 06:14 AM
Hi,
In the reference field attributes, please add the line
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name,ref_ac_columns_search=true,ref_ac_display_value=false
This will allow you to search on user_name.
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2019 05:01 PM
Thank you very much!!!!
I have to learn more about field attributes.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2019 06:15 AM
if you will set the display true on user_name column it will show but it will impact globally on all the reference field or variable, which has been referred to the sys_user table.
you can show userid as search column use below doc for more details.
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=department,ref_ac_order_by=department
https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/field-administrat...