Remove the display value column

You can remove the display value column from a reference field by setting the ref_ac_display_value attribute to false.

Before you begin

Role required: personalize_dictionary

About this task

This causes the reference field to remove the display value column and only display the columns listed in the ref_ac_columns attribute. This feature requires the use of the AJAXTableCompleter class and the ref_ac_columns, ref_ac_columns_search, and ref_ac_display_value attributes.
Note: Auto-complete cannot match text from additional columns when the reference field is a product of the ui_reference UI macro. This means any auto-complete action against a selector, such as the Impersonate User list, can only match text against the display value.

This example describes how to remove the display value column from references to the User [sys_user] table and replace it with references to the first_name and last_name columns.

Procedure

  1. Navigate to a form of the target table, such as User Administration > Users.
  2. Right-click the form header and click Configure > Dictionary.
  3. Select the row that does not list a column name.
    This row is typically the first row in the list. For example, select the first sys_user link.
  4. Under Related Links, click Advanced view.
  5. In the Attributes field, add the ref_auto_completer, ref_ac_columns,ref_ac_columns_search , and ref_ac_display_value attributes.
    For example, to hide the display value column and only display the user's first and last names enter the following.
    ref_auto_completer=AJAXTableCompleter,ref_ac_columns=first_name;last_name,ref_ac_columns_search=true,ref_ac_display_value=false
  6. Click Update.

What to do next

To test the new auto-complete attributes, open a form that references the User [sys_user] table, such as an open incident. Enter a single character in the Assigned to field. The auto-complete options now hide the display value column (user_name) and only display the first_name and last_name columns.
Auto-complete no display value