I need to pass dynamic valued input parameter to calculation view via Odata binding to grid table. I can get calculation view result from Odata with following syntax:
...odata/SERVICE.xsodata/DataSetParameters(P_END_DATE=datetime'2013/07/10',P_START_DATE=datetime'2013/07/03')/Results?$format=json
I am binding grid table with following code in controller (date will be dynamic in actual application)
var gridTable = _this.getView().byId(gridName);
gridTable.setModel(oModel);
gridTable.bindRows("DataSet(P_END_DATE=datetime\'2013/07/10\',P_START_DATE=datetime\'2013/07/03\')", null, null, aFilters);
In runtime I am getting following errors
No key property 'P_END_DATE' exists in type...No key property 'P_END_DATE' exists in type ...Collection 'DataSet' is not directly accessible....Collection 'DataSet' is not directly accessible.
Can anyone help me to know what is the correct syntax to pass the parameter from odata binding?