Set autocomplete.contain for sys_user_group WITHOUT setting glide.ui.ref_ac.startswith to false

Vikram Kee Dam2
Tera Expert

I have a requirement from a client that wants to be able to search with contains in their assignment group field on incident. This is due to their new naming convention of groups.

 

I've found various solutions out there, but all of them take for granted that we need to disable the glide.ui.ref_ac.startswith system property. This means that all reference fields will be affected I think, and we only want it for sys_user_group on the incident dictionary override. Some fields do not do well with wildcard search as default.

 

Is there a way I can do this without disabling the property? I've tried setting attributed such as AJAXTableCompleter etc. but it all seems to be overriden by the property.

1 REPLY 1

Slava Savitsky
Giga Sage

If you set glide.ui.ref_ac.startswith system property to false, your reference fields will still be doing the "starts with" search unless you configure user preferences to override that behavior.

 

Out of the box, there is only one such user preference – sys_user.autocomplete.contains – which makes all references to the User [sys_user] table to use "contains" search instead of "starts with", but you can either delete it or set it to false if you don't want it to work that way. You may also want to double check if there are other preferences in your instance that end with ".autocomplete.contains" and adjust them accordingly if needed.

 

To have reference fields pointing to the Groups [sys_user_group] table use "contains" search by default, create a new user preference – sys_user_group.autocomplete.contains – and set it to true. Make sure to also check the System flag in that preference. This will impact all reference fields pointing to the Groups [sys_user_group] table, not just the Assignment Group. I was pretty sure there was a way to manage that on a per-field basis, but strangely I could not find any information about it. It may have been deprecated or maybe I am just getting old and my memory fails me.