if an int column that has None values is added to a dataset using system.dataset.addColumn, the result is unexpected:
ds = system.dataset.toDataSet(['Col1'],[[1],[5],[4],[3],[2],[6]])
newCol = [None, None, None, 5, None, 1]
ds = system.dataset.addColumn(ds, newCol, 'Col2', int)
for i in range(0, ds.rowCount):
print i, ds.getValueAt(i,0), ds.getValueAt(i,1)
the result is
0 1 None
1 5 None
2 4 None
3 3 5
4 2 5
5 6 1
It appears that once a non-None value is encountered, this value is repeated instead of subsequent None values until a new non-None is encountered.
I was hoping for a response from Ignition.
I suggest opening a ticket with support.
2 Likes
Like Phil said. Inductive Automation employees only monitor the forum randomly, and it was just chance that I looked at this post today (and only because we just did a unit test for this script function).
I’ll go ahead and file a bug ticket for this, but you’ll normally get much faster response by calling or emailing support. Even if you don’t have a support contract, you can always report bugs to them.
2 Likes
Does anyone know if this bug has been addressed?
EDIT
Nevermind, I found another thread that came after this thread.
http://forum.inductiveautomation.com/t/system-dataset-addcolumn-bug/17558
The bug seems to have been addressed in version 7.9.8.