How to add a related field in reference lookup list?

Med99
Tera Contributor

Hello, I have a reference field in one of my forms called Category Level 2 that points to a custom table x_company_category. That table has a self-reference field called parent.

When I click the lookup icon, I want the popup list to show the current record's name, his parent and the grandparent (parent.parent).

Is it possible to display those columns in the reference lookup popup? If so how? Thank you

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Med99 

you can configure the list layout when you click the Magnifying glass and then add the required fields.

But remember this will impact every place where this table is being referred and it will show always those fields in list

AnkurBawiskar_0-1747841298615.png

AnkurBawiskar_1-1747841336538.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Cheikh Ahmadou
Tera Guru

1. Configure the Reference Qualifier View

Go to the Dictionary Entry of your reference field:

  • Table: the table that uses the x_company_category reference

  • Field: Category Level 2

In the Attributes field, add or modify the ref_ac_columns attribute:

ref_ac_columns=name,parent.name,parent.parent.name

 

2. Make Sure Dot-Walked Fields are Readable

The fields parent.name and parent.parent.name are dot-walked references.

Ensure that:

  • The parent field is a reference to x_company_category

  • The name field is accessible (either display field or readable)

  • You test that dot-walking works