Editing Reference Qualifier to only show limited columns in a lookup window.

shevangisin
Tera Contributor

We have a catalog item with field Service Instance which is referencing to cmdb_ci_service_auto but we want In the Lookup window to show only Name, Install Status, Support Group.Things I tried and dint work: 

1.Created a custom view and referenced that inside my variable attribute and adding the columns inside the variable attribute:

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=name;support_group;install_status,ref_ac_columns_search=true,ref_list_view=reference_lookup

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=name;support_group;install_status,ref_ac_columns_search=true,ref_ac_display_value=false

 

Should I do a script include for this somehow I thought variable attribute should work here?

3 REPLIES 3

21121A3359
Tera Contributor

Hai @shevangisin 

Variable attributes like ref_ac_columns mainly affect the auto-completer/search behavior and not the actual Lookup Select Box popup columns consistently for all catalog variables, especially in Service Catalog and Portal contexts.

Your approach is correct for autocomplete results, but for the lookup window popup, ServiceNow typically uses the table’s configured list view instead.

A better approach would be:

  1. Create a dedicated View on cmdb_ci_service_auto
    Example:

reference_lookup
  1. Configure the list layout for that view with only:

  • Name

  • Install Status

  • Support Group

  1. In the catalog variable attributes use:

ref_list_view=reference_lookup

You generally do not need a Script Include for this requirement unless you want dynamic behavior.

Also note:

  • ref_ac_columns controls autocomplete suggestions

  • ref_list_view controls the popup lookup list view

  • In Service Portal, some lookup behaviors may differ from Native UI

You can also combine both:

ref_auto_completer=AJAXTableCompleter,
ref_ac_columns=name;support_group;install_status,
ref_ac_columns_search=true,
ref_list_view=reference_lookup

If the popup still ignores the view:

  • Check whether the variable is using Reference type vs Lookup Select Box

  • Test in Native UI and Portal separately

  • Clear cache after modifying list layouts/views

If this helps resolve the issue, please mark it as Helpful.

Tanushree Maiti
Mega Patron

Hi @shevangisin 

 

 

  • Navigate to System UI > Lists in the application navigator.
  • Search for the following:
    • Table: cmdb_ci_service_auto
    • View: Reference List (sys_ref_list )
  • Open the record. If it does not exist, create a new one with these details

 

  • Under the List Elements related list, you will see the columns currently displayed.
  • Click Configure List Layout (or right-click the header on a lookup popup and select Configure > List Layout).
  • Move Name, Install Status, and Support Group to the "Selected" column.
  • Remove all other fields.
  • Click Save. 

Sample screen shot : 

Screenshot 2026-05-11 222654.png

 

Sample screen 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Tanushree Maiti
Mega Patron

Hi @shevangisin 

Also what customization you have done i.e updating dictionary attribute - That is for  how the columns appear in the autocomplete search (when typing in the field).

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: