cancel
Showing results for 
Search instead for 
Did you mean: 

I've 2 tables in my page. I need to filter data in 2nd Table based on a value selected in Table 1

former_member689921
Discoverer
0 Kudos
138

1st Table has 3 columns which was binded using "{oModel/>otestarray1}"

1 - Radio Button, 2 - MaterialNum#, 3 - Description

2nd Table has 2 columns which was binded using "{oModel/>otestarray2}"

1- OperationNo, 2 - WorkCenter

Here there is no common column in the tables . But in the ODATA that i have, "materailno" as a common value in both the arrays.

When i select a radio button in the 1st table, which has a column "MaterialNum#", data in the 2nd table should be filtered based on the "MaterialNum#" column in the first table.

View Entire Topic
0 Kudos

Hello Shashikanth,

Using select event for radiobutton get the Material Number and filter second table using below code,

var sMaterialNumber= oEvent.getSource().getParent().getBindingContext().getObject().MaterialNumber;

var oFilter = new sap.ui.model.Filter("MaterialNumber", sap.ui.model.FilterOperator.Contains, sMaterialNumber);

GRID TABLE: oTable2.getBinding("rows").filter(oFilter, "Application");

RESPONSIVE TABLE: oTable2.getBinding("items").filter(oFilter, "Application");

Thanks,

Kumar