2
Ui5 doc提供了一個例子,過濾器列表結合或者與AND或OR:如何將兩個sap.ui.model.Filter與不同的運算符連接起來?
new sap.ui.model.Filter({
filters: [...],
and: true|false
})
我有兩個濾波器陣列是用串聯OR,如何連接這兩個陣列ALL?是這樣的:
PRODUCTS $跳過= 0 & $頂= 20 & $濾波器=(substringof( '單程',ID)或 substringof( '單程',類型)和 substringof( 'A',名稱)或方向EQ 'A'
下面是我的代碼:
oTableSearchState1 = [new Filter(filterArray1, false)] //OR
oTableSearchState2 = [new Filter(filterArray2, false)] //OR
oTable.getBinding("items").filter(oTableSearchState1, "Application");
(我試過new Filter(filterArray1.concat(filterArray2), false);
和oTable.getBinding("items").filter(oTableSearchState1, "Application").filter(oTableSearchState2, "Application")
,顯然它們不工作。)