For a reference field in catalog, display a column but don't search with the column value

Aniket1498
Giga Guru

I have a reference field referred to cmn_department in a catalog item. I want to display the fields name, id, parent to the user but want to restrict the user from searching with parent.

For Example, if I have 30 records with Parent as "IT" and also a record as "IT", while searching in the field with "IT", it should show only one record without parent and not the complete 31 records. Also, if I search with any id, it should show the results having the id.

Field name in Catalog: u_department
Reference: cmn_department
Variable Attributes: ref_ac_columns=name;id;parent,ref_ac_columns_search=true,ref_ac_display_value=true,ref_ac_order_by=name,ref_auto_completer=AJAXTableCompleter


I believe that something needs to be altered in the variable attribute for this to work. Kindly help out here.

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Aniket1498 Setting the Reference auto completer columns search (ref_ac_columns_search) property to true allows a user to search within the reference field, by any field specified in the ref_ac_columns property. Since the parent field is already included in ref_ac_columns attribute in your case, the search will always return those additional records. Unfortunately, there is no way to control this.

 

Hope this answers your question.

View solution in original post

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@Aniket1498 Setting the Reference auto completer columns search (ref_ac_columns_search) property to true allows a user to search within the reference field, by any field specified in the ref_ac_columns property. Since the parent field is already included in ref_ac_columns attribute in your case, the search will always return those additional records. Unfortunately, there is no way to control this.

 

Hope this answers your question.