Skip to Content
0
Former Member
Oct 30, 2015 at 07:55 AM

Filter Query

41 Views

oValueHelpDialog.getTable().bindRows("/CompanyCodeValuehelp?$filter=CompanyCode eq '0001'");

In this query i have passed hard coded value '0001'. Here I need to pass a variable.The variable contains value that is filled by user in form.

var aFilters = [];

var sQuery = oEvt.getParameter("query");

console.log(sQuery);

var oColModel = new sap.ui.model.json.JSONModel();

oColModel.setData({

cols: [

{label: "Company Code", template: "CompanyCode"},

{label: "CompanyCodeName", template: "CompanyCodeName"}

]

});

oValueHelpDialog.getTable().setModel(oColModel, "columns");

oValueHelpDialog.getTable().setModel(sap.ui.getCore().getModel("oDataModel1"));

oValueHelpDialog.getTable().bindRows("/CompanyCodeValuehelp?$filter=CompanyCode eq sQuery");

In this way I m trying to implement it. But it is not working.

Please guide me