Convert columntype in table to integer

Consider using the platform’s DatasetBuilder class. Something like:

from java.lang import Integer, String
from com.inductiveautomation.ignition.common.util import DatasetBuilder

def someFunction():
    b = DatasetBuilder.newBuilder().colNames("col1", "col2").colTypes(Integer, String)
    for x in range(5):
        b.addRow(x, "V%d" % x)
    return b.build()
3 Likes