This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

Access to object's "updated at"
#1
Hi, is possible to access to system "updated at" object values?? 

I want to put this times at visu to see real values updating time and not create any additional scripts for that. Can we do such things? 

Alex
Reply
#2
Hi,

Yes you can but you need script. You can use this:
Code:
stamp = os.date('*t', grp.find('1/1/1').updatetime)
value = string.format("'%04d-%02d-%02d %02d:%02d:%02d'", stamp.year, stamp.month, stamp.day, stamp.hour, stamp.min, stamp.sec)
log(value)
BR,

Erwin
Reply
#3
Erwin Big Thanks!!
Reply
#4
Hi 

I want to know if the last update was through a button press or a visualization action, so who did it 

How can I do this ?

Thanks
Nicky
Reply
#5
Hi,

The sender source is part of the event, but this can only be fetched during the event itself and is not recorded in the database ‘objects’ table, so there is no way to get this from grp.find like this sample above.

When you log a object the sender source is added to the log inside the database in the table 'objectlog' inside field 'sender', here you could request this data afterwards, downside is that you have to enable the logs on the object you want to know this from.

BR,

Erwin
Reply
#6
Thanks Erwin, I was afraight of that.

Might add an event handler to store it in a custom attribute
Reply


Forum Jump: