Skip to Content
0
Former Member
Jan 27, 2016 at 06:54 PM

Formatter function is not defined..

239 Views

Hi There,

I am getting error on following code:

Error - "test4odata" is not defined.

where I am doing wrong?

-----------------------------------------------------------------------------------------------

jQuery.sap.declare("test4odata.model.formatter");

sap.ui.define(function() {

"use strict";

test4odata.model.formatter = {

status: function(Price) {

if (Price == undefined) {

try {

var nPrice = Math.ceil(Price);

if (nPrice < 10) {

return "lower";

} else if (nPrice > 10) {

return "higher";

} else {

return "Error";

}

} catch (err) {

return "None";

}

} else {

alert("undefined");

}

}

};

}, /* bExport= */ true);

------------------------------------------------------------------------------------

regards.

Laboni.