I have used adhoctrends for about a year now without issues. Recently we have updated ignition to 8.1.24 and also added a new SQL database.
Suddenly I noticed that the save to DB function in AdHocTrends is broken, i suspect its because i have more than one database now. Tried to import a fresh version 1.0.7 from the exchange, to make sure i haven't messed something up, but it is still the same.
The problem is that when you press load or save, it says "no databases found". They do show up in the configure databases window.
Tried to "hardcode" the database by removing the bindings and pasting "my_sql_database" in all the properties that i think needs a database. It worked somewhat but it would reset the property when pressing save, and you would have to refresh the page.
Anyway, after searching the forum and trying a few different things i found that if i removed
and self.rootContainer.databaseEnabled(database['Name'])"
from the databases binding, it works!
The problem with this is that both databases is now permanently enabled.
The "databases" binding:
def transform(self, value, quality, timestamp):
# collect the database connection info, check for which ones are enabled for storing ad hoc trend configs
databases = []
for row in range(value.getRowCount()):
database = {}
for column in value.getColumnNames():
database[column] = value.getValueAt(row, column)
try:
##This edit makes it work:
##database['Enabled'] = database['Status'] == 'Valid' and self.rootContainer.databaseEnabled(database['Name'])
database['Enabled'] = database['Status'] == 'Valid'
except:
database['Enabled'] = False
databases.append(database)
return databases
Have anyone experienced the same issue, and did you come up with an solution?