Hello,
we want to pre-filter our relation field search by another entity.
If we use the type "equals" everything works fine, but if we add filter type "isNotEmpty" the search is executed but the result is only filtered by "equals" filter but not by "isNotEmpty".
When we execute the search manually, the result is correctly filtered by "equals" and "isNotEmpty" types. So it seems that the "isNotEmpty" type filter is ignored in our case.
Tested with versions:
5.4.5. and 5.9.3
Questions:
Screenshot:
Best regards,
Thomas Kutschker
we want to pre-filter our relation field search by another entity.
If we use the type "equals" everything works fine, but if we add filter type "isNotEmpty" the search is executed but the result is only filtered by "equals" filter but not by "isNotEmpty".
When we execute the search manually, the result is correctly filtered by "equals" and "isNotEmpty" types. So it seems that the "isNotEmpty" type filter is ignored in our case.
Tested with versions:
5.4.5. and 5.9.3
Questions:
- Is the type "isNotEmpty" correct to filter for not empty results?
- What else must be included (value, attribute, etc.) in the JSON section so that the "isNotEmpty" type is not ignored and directly executed?
Screenshot:
Code:
Espo.define('custom:views/vertrag/fields/kostenstelle', 'views/fields/link', function (Dep) { return Dep.extend({ getSelectFilters: function () { var mandant = this.model.attributes.mandantId; var mandantName = this.model.get('mandantName'); if (mandant) { return { 'mandant': { type: 'equals', // this works fine field: 'mandantId', value: mandant, valueName: mandantName }, 'objekte': { type: 'isNotEmpty', // does not work attribute: 'objekte' } }; } } }); });
Best regards,
Thomas Kutschker
Comment