Alias name search wrong condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a query regarding the Service Offering reference field on the Incident form.
Beside this field, there is an alias search button that opens a popup (the Service Offering list view) to search for alias names.
When I click this alias button and type a value (for example, 't'), the search only returns results that start with the entered text.
However, I would like this search to behave as "contains" instead — so that typing 't' would match any Service Offering that contains “t” anywhere in the name or alias.
Can anyone please suggest what configuration or action is needed to make the alias search use contains (LIKE) instead of starts with?
I already tried adding "ref_contains"=true to the dictionary attributes, but it doesn’t seem to affect the alias button popup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @reddy28 ,
You can use * for contains to query.
For example:
If you want to query "contains t" anywhere in the name or alias then you need use the "*t" in name and alias separately at a time so, it will show all the records whose name field contains t, same when query in the alias field.
If you apply the "*t" in both fields (name and alias) at the same time, it will show only those records in which both fields (name and alias) contain t.
Hope, it helps you.
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Community Alums
Thank you for your reply. However, in my scenario, I should be able to see “contains” results in the filter without using the “*” keyword when I search with the letter “t”.
I’ve already followed the steps mentioned in this article:
but it’s still not working.
Could you please help check this further?
Regards,
Venkat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @reddy28 ,
I have checked your above-mentioned kb article, it works on the reference field of service_offering on the incident form, not on the list view of the service_offerings that open after clicking on search/ alias search button.
Here's the complete solution:
1. Ensure that the system property "glide.ui.ref_ac.startswith" is set to false.
2. Confirm that the reference field has similar dictionary attributes as the following:
encode_utf8=false,ref_ac_columns_search=true,ref_ac_order_by=column_name,ref_ac_columns=name;aliases,ref_auto_completer=AJAXTableCompleter
3. Create the following user preference:
Name: table_name_being_referenced.autocomplete.contains (i.e. sys_user.autocomplete.contains)
in your case, it's service_offering.autocomplete.contains
System: checked
User: leave this blank
Type: true | false
Value: true
4. After the user preference has been created log out and back into the instance for it to take effect
When you type t in the service_offering field, it will show matching records with name and aliases:
It won't work on the list view, but like this.
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
