我想在表绑定上搜索实现多个过滤器。要求是将多个过滤器与和条件相关联:
伪代码:
if(filterA&& filter1 || …
你正走在正确的轨道上 和 属性:
new sap.ui.model.Filter({ and:false, filters: [ new sap.ui.model.Filter({ and: true, filters: [ new sap.ui.model.Filter("property1", FilterOperator.Contains, sQuery), new sap.ui.model.Filter("property2", FilterOperator.Contains, sQuery) ]}), new sap.ui.model.Filter({ and: true, filters: [ new sap.ui.model.Filter("property3", FilterOperator.Contains, sQuery), new sap.ui.model.Filter("property4", FilterOperator.Contains, sQuery) ]}), new sap.ui.model.Filter({ and: true, filters: [ new sap.ui.model.Filter("property5", FilterOperator.Contains, sQuery), new sap.ui.model.Filter("property6", FilterOperator.Contains, sQuery) ]}) ]});