Help with Reference Qualifier – Search by Multiple Fields (Name, Code, Country)

abhisheksat
Tera Contributor

Hi everyone,

I have a catalog item that includes a reference field referencing the core_company table. By default, the lookup works fine when searching by the company name, but now my client wants to be able to search by company name, company code, and country.

I tried configuring the reference auto-completer as follows:

ref_auto_completer = AJAXTableCompleter
ref_ac_columns = name;u_company_code;u_country_ref
ref_ac_columns_search = true


However, this doesn’t seem to be working at all — it still only searches by the name field.

Has anyone successfully configured a reference field (especially in a catalog item) to search across multiple columns like this?
Any tips or examples would be greatly appreciated!

Thanks in advance!

7 REPLIES 7

J Siva
Kilo Patron
Kilo Patron

Hi @abhisheksat 
According to the product documentation, ref_ac_columns works only for Reference and Requested For type variables

JSiva_2-1761823194508.png

For lookup-type variables, you should use the 'Lookup label field(s)' option as shown below. This allows you to search using multiple field values

JSiva_0-1761823171925.png

 

Regards,
Siva

 

Sorry for confusion I am using a reference field here

@abhisheksat I hope you are using like this in your variable.. If yes, then it should work.. i just tested in my PDI

 

JSiva_0-1761825647238.png

ref_auto_completer=AJAXTableCompleter, ref_ac_columns=name;zip;city, ref_ac_columns_search=true

 

Ankur Bawiskar
Tera Patron
Tera Patron

@abhisheksat 

if it's reference type and not Lookup select box then it should be working fine by simply adding those field names in ref_ac_columns attribute.

you should add comma here i.e as separator between attributes like ref_auto_completer, ref_ac_columns_search

ref_auto_completer = AJAXTableCompleter,ref_ac_columns = name;u_company_code;u_country_ref,ref_ac_columns_search = true

share your variable config screenshot

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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