How can we change the search on reference field from begin to contains and also restrict it to one particular item.

purushothamyb
Mega Contributor

How can we change the search on reference field from begin to contains and also restrict it to one particular item.

i,e there are two reference field used in an item .the search on reference field should be changed from begins to contains only for these two variables used in this item only.it should remain the same for other.Can we achieve as i know that disabling   glide.ui.ref_ac.startswith system property will be reflecting on all reference fields.

Can anyone please suggest your views this would be helpful.

 

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Puroshotham,

 

By default system searches reference fields with starts with. if you set that property glide.ui.ref_ac.startswith to false then it will be global one.

https://community.servicenow.com/community?id=community_question&sys_id=7ab383a5dbd8dbc01dcaf3231f96...

 

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Puroshotham,

 

By default system searches reference fields with starts with. if you set that property glide.ui.ref_ac.startswith to false then it will be global one.

https://community.servicenow.com/community?id=community_question&sys_id=7ab383a5dbd8dbc01dcaf3231f96...

 

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Hi Bawiskar,

Thanks for the reply 

Can't we restrict it from applying globally.

 

 

Hi Puroshotham,

 

It seems to be global property and will affect all reference field.

you can set user preference though so what will happen is that for specific users it will use contains operator instead of startswith. This solution will work if for limited users you want contains operator and won't work for large set of users.

https://docs.servicenow.com/administer/field_administration/task/t_ContainsAutoCompleteSearch.html

 

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Hi,

How do you make it user specific? Will appreciate a quick answer as I need it soon.

Thanks!