- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a reference field where autocomplete search works using:
ref_auto_completer=AJAXReferenceCompleter, ref_ac_columns=name;u_site_code, ref_ac_columns_search=true
I can search by name and site code, but the autocomplete dropdown still shows only the name (display value).
Is there any supported way to display Name – Site Code together in the autocomplete results, or does autocomplete only show the display value?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
it should work fine as mentioned by @Brad Bowman
is the field name correct?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Does your Attributes related list on the Dictionary Entry of the reference field reflect the same attributes and values, similar to this from my example?
Have you confirmed that 'u_site_code' is the exactly correct Column name and that this field exists on the referenced table? In my example this is first_name and last_name on the sys_user table since caller_id references this table:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The display column will always be shown in the search results, so you don't really need to include it in the ref_ac_columns attribute. Adding the site code field here should show the field in the search results, provided the field name is exactly correct. To be clear, this is the list of records that match the search criteria, which is different than the display value of the selected record, which will always only show the display field.
For example, if I add ref_ac_columns=first_name;last_name to the attributes on the out of box caller_id field on the incident table, it will look like this:
but once I select a record, it just shows the display field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Brad Bowman
i have used the same code but unable to get the
ref_auto_completer=AJAXReferenceCompleter,
ref_ac_columns=u_site_code,
ref_ac_columns_search=true,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Does your Attributes related list on the Dictionary Entry of the reference field reflect the same attributes and values, similar to this from my example?
Have you confirmed that 'u_site_code' is the exactly correct Column name and that this field exists on the referenced table? In my example this is first_name and last_name on the sys_user table since caller_id references this table:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
it should work fine as mentioned by @Brad Bowman
is the field name correct?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
