I made a script to detect the type and duration of a touch event by writing on a custom property of the view. There is a property change script on this object that compares the last value written with the previous one and returns the duration thanks to the timestamps of the qualified values. The issue is that these timestamps don’t seem to update at all even if the script is triggered and the values of the object change (we print something on the logs each time it's triggered). If I add a key “date” equals to system.date.now() we can easily notice the disparities between the 2 dates.
date = currentValue.value["date"].value
logger.info("timestamp : %s | system.date.now() : %s"%(currentValue.timestamp, date))
The values we can see on the logs are the following :
It looks like this issue only occurs with objets (not values), someone has an explanation ?
Hi automatisation,
Can you provide some more details/screenshots of what the object looks like, the script and exactly where the script is? If I understand you correctly, the timestamp that is not changing might be the timestamp of when the object was created. The object itself isn't changing but the values under the object are, so you may have to either move the script or get the timestamps of those value changes.
Hi,
The change script is linked to an object called "touch" on the view as you can see on this picture :

And this object is written when touch events are triggered on several components of the view. For example, the script associated with the onPointerDown event of the element "test" would be as following :
self.view.custom.touch = {"ID":event.pointerId, "event":"up", "elt":self.meta.name, "date":system.date.now()}
I understand that if i was to write only a key of the dict, the object itself might not update its timestamp, but here I'm not changing the value of a child, I'm addressing the object itself.
I understand now. If you haven't already, I would reach out to Inductive Automation Support so a Software Support Engineer can take a deeper look into this. If possible, a remote session would be best.