Hello Phil,
I just wanted to thank you. The point links worked great once I understood how to use them and the scripting. This is how I did it in case anyone else wants to know:
I have an SQL data source that needs to be read when the data comes in, not on a set interval and I need to use the data's own timestamp.
My data source uses this select statement:
SELECT * FROM staging_all where logger_id=1 and flag=0 order by date asc limit 1;
To trigger the reading of each row I set up a point link as follows:
I have a source data point that is set a a virtual sinusoidal that is going between -1 and +1 every 10 seconds.
I have a target data point set up as a modify table only point.
The point link uses the following one line script:
if (source.value >0) return '(1)'; return '(0)';
I needed this line because the target data point was an alphanumeric data point.
My target point has this script:
UPDATE staging_all SET flag=? WHERE logger_id=1 AND flag=0 ORDER BY date ASC LIMIT 1;
Now the data point that modifies the staging table gets a trigger (1) several times a minute and that causes my data rows to be read one at a time until they are all marked as (1).
Thank you for pointing me in the right direction.