Logic Machine Forum
Access to object's "updated at" - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2)
+--- Thread: Access to object's "updated at" (/showthread.php?tid=1835)



Access to object's "updated at" - AlexLV - 14.01.2019

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


RE: Access to object's "updated at" - Erwin van der Zwart - 14.01.2019

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


RE: Access to object's "updated at" - AlexLV - 15.01.2019

Erwin Big Thanks!!


RE: Access to object's "updated at" - npinguin - 27.01.2019

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


RE: Access to object's "updated at" - Erwin van der Zwart - 27.01.2019

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


RE: Access to object's "updated at" - npinguin - 28.01.2019

Thanks Erwin, I was afraight of that.

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