How can I control list view in reference field?

Paul125
Kilo Guru

Hello, can I add attributes or something else to change list view in reference field? For an instance changing the Name column from first place to different place. Thanks!

1 ACCEPTED SOLUTION

Brent Sutton
Mega Sage

Hi Paul,

Can I check that you are talking about the order that columns are displayed dynamically when you search in the reference field?

If so, you can use "ref_ac_columns" and "ref_ac_display_value" attributes to control the order of columns displayed in the auto complete suggestions.

Right click on field to access context menu >> Configure Dictionary >> Attributes

Set "ref_ac_display_value" to false to hide the displayValue. Then in the "ref_ac_columns" attribute add the name column in the order you want the column shown. Please see example below:

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name;name,ref_ac_columns_search=true,ref_ac_display_value=false

The above example would display the user name first and then the name column in the auto complete results:

find_real_file.png

More information can be found in the ServiceNow Docs, under Dictionary Attributes, if you want to dig into it.

Let me know if this helped.

Brent

 

View solution in original post

6 REPLIES 6

Hi Paul,

I believe that my previous reply answered your question. There is no other method to configure the field displayed in a reference field apart from amending the display value column on the referenced table.

Please mark as correct so other community members can benefit from this information.

Thanks,

Brent

gregmelmoth
ServiceNow Employee
ServiceNow Employee

Just click the Reference Lookup Icon on the form, this will display the list of records in the reference search popup, 

Then right click on the header row and select Configure -> List Layout

This will modify the list layout using the Reference View which only affects the layout of the reference search list

 

find_real_file.png