Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi all, I am trying to get the number of field definitions from my infotable as shown.
In this case, I want the number of field definitions to return 4. I've tried using getFieldCount() but it doesn't seem to work, any help will be greatly appreciated!
Solved! Go to Solution.
Hi @Constantine, thanks for reply. I am actually using an IDE to create a custom widget so your solution might not be applicable. Therefore, I will be using mine as shown in the code below.
this.updateProperty = function (updatePropertyInfo) {
var widgetProperties = this.properties;
var dataRows = updatePropertyInfo.ActualDataRows;
var nRows = dataRows.length;
var rowData = new Array();
for (var i = 0; i < nRows; i++) {
rowData.push(dataRows[i]);
}
}
console.log(Object.keys(rowData[0]).length); //returns 4
Hello,
There you are:
myProperty.dataShape.fields.size()
/ Constantine
Hi @Constantine, thanks for reply. I am actually using an IDE to create a custom widget so your solution might not be applicable. Therefore, I will be using mine as shown in the code below.
this.updateProperty = function (updatePropertyInfo) {
var widgetProperties = this.properties;
var dataRows = updatePropertyInfo.ActualDataRows;
var nRows = dataRows.length;
var rowData = new Array();
for (var i = 0; i < nRows; i++) {
rowData.push(dataRows[i]);
}
}
console.log(Object.keys(rowData[0]).length); //returns 4