getColumnAsList() in 7.9.14

Is getColumnAsList() for datasets not longer available? I have a screen that has used it for years and now it is getting an error

AttributeError: 'com.inductiveautomation.factorypmi.application.bin' object has no attribute 'getColumnAsList'

The error seems to odd to me because the variable is being set to a dataset from a table so why does it say ‘com.inductiveautomation.factorypmi.application.bin’?

here is a snip of the code

dsData = event.source.parent.getComponent('tblPrices').data
headers = [dsData.getColumnName(c) for c in range(dsData.getColumnCount())]
headerIndex = headers.index("PTW")
listPTW = dsData.getColumnAsList(headerIndex)

getColumnAsList is not a member of the Dataset interface.

You must have been operating on an implementation of Dataset that had it, but now you’re not.

If you print out the type of Dataset in the old version and current version you might see the difference. For example, a PyDataSet does not have getColumnAsList on it.

(do something like print type(ds))

Is the query/binding that is populating this table configured to retain rows?

no it is set to false.

In 7.9.x you can import basicDataSet and then use the getColumnAsList on it.

from com.inductiveautomation.ignition.common import BasicDataset
dsData = BasicDataset(event.source.parent.getComponent('tblPrices').data)
1 Like

Either set it true or do what @MMaynard suggests.

The ‘com.inductiveautomation.factorypmi.application.bin’ reference is to ‘com.inductiveautomation.factorypmi.application.binding.util.NonSerializaingDataset’, which is not one of the Dataset implementations that happen to have getColumnAsList. This dataset implementation gets used when the rows are not configured to be retained.


Awww, really? That’s sad. When I first thought of creating my TransientDataset implementation (in my caching module), I deliberately subclassed BasicDataset in order to keep its use seamless.