- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user;user.last_name;user.email;user.user_name ,ref_ac_columns_search=true,ref_ac_display_value=false
Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Suvitha Murugan ,
So you are aiming for a setup where user.last_name remains searchable but is not shown in the autocomplete dropdown. Unfortunately, ServiceNow's autocomplete behavior is tightly coupled to the ref_ac_columns attribute, and there’s no built-in way to selectively hide a column from display while keeping it searchable if it's listed in ref_ac_columns.
Recommended Configuration
ref_auto_completer=AJAXTableCompleter
ref_ac_columns=user;user.email;user.user_name
ref_ac_columns_search=true
ref_ac_search_fields=user.last_name
- ref_ac_columns: Controls what is shown in the dropdown. Exclude user.last_name here.
- ref_ac_search_fields: Allows searching by user.last_name even though it’s not displayed.
- ref_ac_columns_search=true: Enables multi-column search across the listed fields.
Why ref_ac_display_value=false Doesn’t Help
That attribute only hides the default display value (usually the name field), not individual columns. It doesn’t affect visibility of fields listed in ref_ac_columns.
Alternative (if you must keep user.last_name in ref_ac_columns)
If you're using a custom UI or GlideAjax logic, you could:
- Post-process the autocomplete results to strip out last_name before rendering.
- Use a custom formatter or UI policy to mask the column visually (e.g., CSS or DOM manipulation).
But these are workarounds and not supported natively in platform configuration.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Best,
Anupam.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Suvitha Murugan ,
Did you try to remove the user.last_name from the ref_ac_columns?
Regards,
Sarah Bioni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Users should have the flexibility to search using their last name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Remove user.last_name from 'ref_ac_columns=user;user.last_name;user.email;user.user_name'
the ref_ac_columns=xxx;xxx;xxx determines which columns/attributes of the user record are displayed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@John Gilmore
Thanks for the response
Users should have the flexibility to search using their last name. I want to hide display value of the last name during search. Is there any possible way to hide it. Without removing from attribute search.