on ‎2019 Mar 19 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
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
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 |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.