Adding time to another tag

I have a memory tag "Shift1_start" that can be changed daily but I want another event to happen 15 seconds before that tag set time.

The issue I am having is getting the expression in my "newStartTime" expression tag to work.

I got it to work in a custom property by using addseconds({value}, 15) but I cant figure out how to tie that back to another tag.

I am having trouble getting the syntax right in an expression to add 15 seconds to "Start_Time"

Thanks for any help

The screenshot you've provided is from your custom property that's working as you intended?
Have you tried changing your expression tag "newStartTime" to

addseconds({insertPathToShift1_startHere}, 15)

An expression binding without a transform is all you need (as well as negative seconds).
addSeconds({./Shift1_start.custom.shift1_start}, -15)


Tip: don't crop the header off the binding dialog when posting. It shows the name of the component and property to which the binding will be applied and this is very useful in understanding where your binding is being applied.

What is the event meant to do? If you're doing this inside a View, then this won't run if a client isn't connected, and will run for every client that is. Is that what you want?

If not, you want to be using a gateway scoped event like a tag value change event, or a gw tag change event

This is exactly what I was looking for. I was just doing the syntax incorrectly.

Thank you!

I was looking to take a memory tag with a date / Time in it and create another memory tag that was 15 seconds earlier. Both tags are in a gateway script, I just couldn't get that syntax to work for some reason

1 Like

Hmmm, it sounds as though you have failed to get something to reset in the right sequence on shift reset so you are applying a workaround by doing it 15 s early in the hope that 15 s is enough time to ensure that it will always work. If that's the case then you're hiding a problem somewhere.

That wouldn't be a memory tag, but an expression tag.