Using "Contains" in Reference Qualifier for Custom CSM portal without changing global property.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2025 12:54 AM
Hi everyone,
I'm working on a custom CSM portal where i have a variable with reference qualifier that currently uses "starts with" for searching. The requirement is to switch this to contain to make searching easier and to provide better results for users.
The solution i found so far is to change the global system property '"glide.ui.ref_ac.startswith" is set to false. But im concerned that modifying this property will impact the entire platform.
Does anyone have any suggestions or best practices on how to implement "contains" search for reference qual without changing the global system property.
Thanks in advance for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2025 07:50 AM
Hello,
There is a way, but it's very complex.
First, you need to clone the ServiceNow Angular directive.
You can find it here: yourintance.com/scripts/sn/common/controls/directive.snRecordPicker.js
How to create a directive: Exercise: Create a Directive | ServiceNow Developer
Second, you need to change the original code to always use "contains" instead of "startsWith".
Third, create a widget and configure your directive in the HTML code.
Next, in your catalog item, you'll need to create a new variable of type "custom" and select the widget you created earlier.
If this is helpful, please mark it as helpful or accept the solution.
