Reference field search with user's name and phone /email at the same time

ChinchillaMoMo
Mega Guru

Hi Community,

 

I have a reference field pointing to customer_contact table, right now user has to type in contact name in order to search for contact and put in the field. But it is possible to also type in, e.g. phone or email, in the field and it will also search contact as suggestion?

 

Screenshot 2024-03-12 at 14.36.32.png

 

Many thanks!

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hello,

Yes, lookup can be done with phone no/email as well.

Please add the below attributes at the field dictionary level.

 

ref_ac_columns_search=true, ref_ac_order_by=column_name, ref_ac_columns=column_name1, column_name2, ref_auto_completer=AJAXTableCompleter

 

below is an example:

 

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,phone,ref_ac_columns_search=true;

 

Reference links:

https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/field-admini...

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715718

 

Please mark my response as helpful/correct if this helps.

 

Regards,

Bhavani 

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Hello,

Yes, lookup can be done with phone no/email as well.

Please add the below attributes at the field dictionary level.

 

ref_ac_columns_search=true, ref_ac_order_by=column_name, ref_ac_columns=column_name1, column_name2, ref_auto_completer=AJAXTableCompleter

 

below is an example:

 

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,phone,ref_ac_columns_search=true;

 

Reference links:

https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/field-admini...

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715718

 

Please mark my response as helpful/correct if this helps.

 

Regards,

Bhavani 

It works! thank you!