In order to populate the "table" I'm using this code:
- Code: Select all
var ds = databaseManager.createEmptyDataSet();
ds.createDataSource('organizations');
And then, using a for loop I'm trying to populate it using, i.e., this:
- Code: Select all
ds.addRow([100, 'Spain', 'Organization XYZ'])
But it throws an error.
If I use datasources.mem['organizations'].getColumnNames() I receive: "organizationid, countryname, name". But If I use ds.getColumnNames() I only receive 2 fields: "countryname, name", so I can't set the organizationid field using ds.addRow()
What's wrong in my code?