Transaction Group Execution Identifier

Hello!

I am struggling to come up with a solution to my problem.
I was hoping to use transaction groups to continuously store process data when a boolean tag is high.

That part is easy.
I was also hoping to generate a unique Id for the entire 'transaction' that I could add to the SQL table. Something quick that came to mind was to have a triggered expression item with an formatted datetime down to the (ms). Problem is, as I'm you already know, this updates every second or two and creates a new value.

Is there a native solution to generating an Id based on an execution transaction? Meaning when the group stops executing (due to the BOOL tag going low), then turns back on sometime in the future, this next 'batch' of values will get a newly generated transaction 'Id', and it will be stored with every single value until then next go-round.

Thanks!

Edit:

Ok, I probably should have waited before posting this.
The solution I came up with was a crafty expression, run-always.

Basically, if the trigger for the transaction group is LOW, generate a new datetime Id, and in the False section, just reference itself so it keeps the value.

Hope this helps someone who comes along in the future. Sorry for the premature post!

You might need to handle the case where the transaction group starts while the trigger is high, and it hasn't yet computed a value. I think you'll get a NULL.