Make reference field searchable by 2 different fields.

Filipe5
Kilo Expert

Hello all,

 

I am new to ServiceNow and have an existing reference field on a form where users can search for a company by name:

find_real_file.png

 

I need to make it so that users can also use the same field to search by a different value (a 4 digit code), that most companies on our database also have, and present the company name if any is found (the same way it's currently happening).

 

Is it possible to change the current reference field to include that option, or would it be simpler to create a new field and populate either with info from the other one?

 

Thanks in advance for any help!

5 REPLIES 5

Community Alums
Not applicable

Hi Filipe,

 

Code is almost correct but just a small error in this -"ref_auto_completer=AJAXTableCompleter,ref_ac_columns=name;code,ref_ac_columns_search=true;"
just change the order in code like below mentioned , It will work. : ref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns=name;phone

Thanks,
Avinash Reddy