I need to use a Block Transaction Group to pull information on multiple tanks from a database table into their corresponding Ignition tags.
In the block view, the items are in alphabetical order based on the tank’s name. The tanks are named “H100,” “H101,” etc.
In order to ensure that my SELECT query pulls in the rows sorted by name, i must make “name” as the custom index column. However, Ignition is not happy when this custom index is non-numeric. I get an error that “H100” cannot be cast as a BIGINT.
I can make my custom index the primary key in my table, but then the sorting is incorrect: Ignition will return rows sorted by the primary key, causing a mismatch between the tanks. Tank H100 will receive H107’s data, because H107 has a lower primary key value.
Is there a way that I can: convince Ignition that having a custom index that is alphanumeric is acceptable OR sort my SELECT query based on a column other than the custom index?