Hi All,
I have a requirement where I need to append the query dynamically based on the input parameters value.
I am trying the below method, but doesn't work
In DataSet open method
testDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
testDataSet.open();
var sqlText = new String();
sqlText = " SELECT id, status,job,site from workorder "
+ " where " + params["where"]
+ "siva"
;
maximoDataSet.setQuery(sqlText);
in beforeOpen method of Dataset I am trying replace the text siva **in the query dynamically based on input parameter, but it is giving error
**cannot call method 'replace of undefined". Please help me, how can I do it?
//beforeOpen code
sqlText = this.sqlText.replace("siva", "AND STATUS = " + params["site"]);
Thank you!!