SAPUI5: How to filter data with 2 or more values

前端 未结 9 1255
被撕碎了的回忆
被撕碎了的回忆 2021-02-04 20:51

I\'m currently trying some stuff with/in SAPUI5 and I\'ve implemented a very simple search like this:

    var filters = [];
    var query = evt.getParameter(\"qu         


        
9条回答
  •  温柔的废话
    2021-02-04 21:24

    to combine multiple filters you've to write the filter this way:

    new sap.ui.model.Filter({
        filters: [
        new sap.ui.model.Filter(col1, , ,val),
        new sap.ui.model.Filter(col2, , ,val)
        ],
        and: false
    })
    

    Source: https://sapui5.hana.ondemand.com/docs/api/symbols/sap.ui.model.Filter.html#constructor

    Then you can filter in multiple columns with OR.

提交回复
热议问题