on 03-19-2019 12:47 PM
Hello,
my issue is this.
In below coding (simplified), what is the reason that the property "status" is becoming a string?
The oData Field is a Integer.
var iStatus = parseInt(oView.byId("status").getSelectedKey(), 10); //get Status of select
oModel.create(sPath, {
//...
status: iStatus,
//...
}, fnCallback...);
console.log(oModel.getProperty("status"); --> STRING
Hello Johannes,
console.log writes a message to the console by default
please use typeof operator to get the primitive type of the variable:
var status = oModel.getProperty("status");
console.log(typeof status);// expected output: "number" in your case
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.