1

I am having a comboBoxelement which has years init,

under this a table is displayed using odata default binding and when i select a year from comboBox i am using a Filter condtion to filter the data.

But this is giving me different results as i found from odata side the values are filtered well but in front end these are showing different year data.

here is a sample of my code for filter:

    this.selYear = this.getView().byId("idComb").getSelectedItem().getText();
    var oTable = this.getView().byId("idTable");
    var oFilter = new sap.ui.model.Filter("Zyear", sap.ui.model.FilterOperator.EQ, this.selYear);
    oTable.getBinding("items").filter(oFilter);

when i have multiple years for ex :

year date        ernum
2021 28.05.2020  1002
2020 03.06.2020  1000
2020 03.06.2020  1001

if i filter with 2020 it shows one record of rows 1 and 2

KcH
  • 3,302
  • 3
  • 21
  • 46
Pavan
  • 19
  • 2

0 Answers0