SQL tag returning null values, workaround?


I have some SQL query tags that are returning NULL fairly often and need an easy fix or workaround to store the last non-zero value. I’m fairly certain it’s an issue with the underlying database that stores tankTable but can’t modify that right now.

What would be the best way in Ignition to store the most recent queried non-zero value? Maybe a Gateway Timer Script that reads from my existing tag or database and non-zero values to another tag or SQL table.


Am I missing any built-in functionality that could help me out here? The end goal is to prevent my Easy Chart from looking like this:

Thanks for any tips,


I wouldn’t store history on a query tag. I’d chart the data from the source DB.

Thanks but it’s too late for that…

I enabled ‘Ignore Bad Quality’ on the Easy Chart and we’ll see if this works for now. Working on the root cause on the export table might be the best course of action as any workaround seems silly and tedious.