Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   How to update date fields so 'alarms' work correctly., posted by John on Sat Feb 29 06:04:57 2020 
    icon2.gif   Re: How to update date fields so 'alarms' work correctly., posted by Sebastian Schenk on Fri Mar 13 16:38:53 2020 
       icon2.gif   Re: How to update date fields so 'alarms' work correctly., posted by John on Fri Mar 13 18:34:30 2020 
Message ID: 69123     Entry time: Fri Mar 13 16:38:53 2020     In reply to: 69122     Reply to this: 69124
Icon: Reply  Author: Sebastian Schenk  Author Email: sebastian.schenk@physik.uni-halle.de 
Category: Question  OS: Linux | Windows  ELOG Version: ELOG V3.1.2-bd7 
Subject: Re: How to update date fields so 'alarms' work correctly. 

Dear John,

I am a user of the elog system and no developer, so no complete answer guaranteed.

The quote of the manual describes the case, if e.g. an hardware component discovers a failure and the connected PC makes an automatic (new) entry to the elog. Probably modifying an existing one.

I have small concerns on your solution. The description of your alarm system sounds the other ways around, as you are doing something, depending on the elog entries. Based on your statement on JS and dedicated start page, you want to do it on client-side and not on the server. Where I can see the issue, if there is not client, then there is no alarm. As you want to change the date of the entries, I believe, you want to reuse the same entries multiple (infinite?) times instead of creating new ones. The later would be the style of an logging software like elog.

As far as I know, the Date attribute is special and cannot be changed by submitting something to the elog server. as this would make "Restrict edit time" useless. You can try it with this in your config:
Subst on edit Date = $date
Making an entry and edit it afterwards. The entry time stays the same.
If you really want to use this attribute, you have to do some scripting to the actual saved .log files, but this is not intended as I believe.

What you can do, is using an alternative attribute like "MDate" with the config:
Subst MDate = $date
Subst on edit MDate = $date
This will update every time you edit the entry.
Then you probably want to add something like this to your config
List display = ID, MDate, Author, ...

Or "Update" using the duplicate function on the old entry, where you want to change the date, creating a new one with the same content.
Or "Update" using the reply function to create a new entry, referring to the old one.

I hope, I could help.
Best wishes,
Sebastian

John wrote:

Hi Stefan!

In the user manual under misc it says this: "The elog program makes it possible to submit logbook entries automatically by the system or from scripts. In some shift logbooks this feature is used to enter alarm messages automatically into the logbook. "

Ok what am trying to do is have all messages update (somehow) without the user entering each record. I want my alarm system to be able to keep-up2-date on the expirations, by simply updating the 'date' fields I have in the logbooks (JS). I am getting used to JavaScript, and have all of that working as far as the actual 'alarms' are concerned. But they are useless if the dates are stagnent (ie. not updateing at least once per day).

So can you refer me to the 'shift books' you reference above, so I can understand how to write the code necessary? I've spend much time searching the net on this and experimenting, so I did try to find out before I posted. I believe using a combination of the Elog Utility, with a dedicated 'start page' that is mostly JS, will be part of the solution...

Thanks soo much for your help and awesome creation! :)

John

 

ELOG V3.1.5-fe60aaf