Updating Transaction Groups Daily

On the Transaction groups, I would like to update the value continuously for the entire day and then on the start of the new day insert a new row and start updating that new row for the next day and store the previous days in the DB.

Is this possible with transaction groups or is it better to run a script on tag change?

What value are you logging? Is it an odometer style (constantly increasing until rollover point) value? If so, it would be better to just insert a new row with the current value at a set rate and use a LEAD/LAG query to get the total by day for whatever time period you have.

Otherwise, you will need to make a Gateway Tag Change Event script that would look for a row for the current 'day' and update it, or insert a new row with the current value.

I don't believe you can achieve what you want with a transaction group.. They buried the option in the manual text.

1 Like

Thanks for the Reply, I ended up using a Key Value pair to compare a Tag set to Midnight of the current Day and inserting that as a Read-Only Column. Once the day changed over it would insert a New row with "Insert New Row When Not Present Selected"

Got the Idea From this Video: