Notifications

39 views

Description

Symptoms

When a 'True/False' field type is part of the reference columns attributes (ref_ac_columns) in a Reference variable on a Catalog Item, then the typeahead search does not work and displays records that do not match the search, see the example below:

  

 

For instance, having the following Variable attributes in a reference variable:
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name;employee_number;email;department;active   

 

 

 

Notice, 'active' is a 'True/False' field type. If the 'True/False' field type is removed, then the search works as expected, see below:    

 

 

 

Steps to reproduce: 

1.Create a catalog item or modify an existing one.
2.Add a reference variable as follow:
Type= Reference
Question = User Reference
Name =user_reference
Type Specifications
- Reference= sys_user
- User reference qualifier= simple
- Variable attributes= ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name;employee_number;email;department;active 

 

 

 

 

3.Save and try from Service Portal

Expected behavior
In an Out of the Box instances (OOB data), if you type abel
The following user should be displayed:
Abel Tuter

Actual behavior
In an Out of the Box instances (OOB data), if you type abel
The following users will be displayed:
Abel Tuter
Aqib Mushtaq

If the 'True/False' field type is removed, then the search works as expected. 
 

 

Release

Madrid.

 

Cause

This is the expected behavior,  in the example used here, the sys_user table has the attribute ref_ac_columns_search=true which means ref_ac_columns as used to search typeahead in reference [/sys_dictionary.do?sys_id=f83089223433230078507f0289bd01b8&sysparm_record_target=sys_dictionary&sysparm_record_row=1&sysparm_record_rows=68&sysparm_record_list=name%3Dsys_user%5EORDERBYname]

The active in the ref_ac_columns caused the issue in the search as true/false column should not be used for search. 

 

Resolution

Option 1: 
1. Go to the System Definition >> Dictionary and search by the referenced table where type is collection.
2. Go to the Attributes TAB (related link) and set ref_ac_columns_search=false which makes search work only on name, and not on ref_ac_columns fields 

 

Option 2:
1. Remove active from ref_ac_columns 

This what happens in platform form as well. Same configuration in platform form will also have same result. 

 

 

Article Information

Last Updated:2019-08-02 20:36:11
Published:2019-07-26
Screen Shot 2019-07-26 at 10.28.46 AM.pngScreen Shot 2019-07-26 at 10.28.56 AM.pngScreen Shot 2019-07-26 at 10.29.33 AM.pngScreen Shot 2019-07-26 at 10.29.33 AM.pngScreen Shot 2019-07-26 at 10.29.33 AM.pngScreen Shot 2019-07-26 at 10.33.19 AM.pngScreen Shot 2019-07-26 at 11.19.48 AM.pngScreen Shot 2019-07-26 at 11.42.38 AM.png