how to modify search in reference variable on service portal

Kifrez
Kilo Guru

Hi ,

Could someone help me how to search text using contains instead of start with on Service portal?

Variable : Reference

The result that I want for example

If I type accounts , then all the role description that has the word  "accounts" should show up on the list

screenshot below shows that the search term is start with. instead of contains.

find_real_file.png

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hi,

You'd want to use the "wildcard" asterisk *

so: *accounts

You can also use something like: https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/field-administration...

Which means applying an advanced field attribute such as:

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=first_name;last_name,ref_ac_columns_search=true,ref_ac_display_value=false

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi @Allen A , thanks but it's not suitable for most general users.

They will not search using *

Is there any way to set the default search to use contains/* ?

Hello,

It has been suitable as this is the default setting, but if you've surveyed all your users and found that they won't use that and user training won't help...then you can adjust the reference attribute as I mentioned above or consider changing the system property for the entire instance to not search as "starts with" and instead use "contains"...for reference fields.

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

Please mark reply as Helpful/Correct, if applicable. Thanks!

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

Thanks for marking my reply as Helpful.

If it also helped guide you Correctly, please also mark as Correct.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!