Requirement 1: Custom-Module Records should be filtered based on 'name' field which starts with 'A' OR 'B' OR 'C'.
File path: custom/Extension/modules/custom-Module/Ext/clients/base/filters/basic/filterForQuotes.php
'filter_definition' => array(
'$or' => array(
'name' => array( '$starts' => 'A', ), // 'A' should be dynamically populated
'name' => array( '$starts' => 'B', ), // 'B' should be dynamically populated
'name' => array( '$starts' => 'C', ), // 'C' should be dynamically populated
File Path: custom/modules/Quotes/clients/base/fields/custom-relate/custom-relate.js
this._filterOptions = new app.utils.FilterOptions()
'name': 'A', // how to pass multiple values A/B/C to $or in above filter
definition from here?
Requirement 2: Conditionally, filter records where 'name' starts only with 'A' and ignore 'B' and 'C' with the above filter definition.
Possible solution that I found:
Adding dynamic filter definition in buildFilterDef( ) method of filter.js
File : custom/clients/base/layouts/filter/filter.js
But, is it possible to pass multiple values and ignore certain filters dynamically in filter definition?