ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
66451
|
Mon Jul 20 13:52:58 2009 |
| Richard Stamper | r.stamper@rl.ac.uk | Question | Windows | 2.7.5 | Re: Using conditional attributes |
Stefan Ritt wrote: |
Adam Blandford wrote: |
Hi
I have a logbook including the attributes: Author, Topic Date, Phase, Reference, Subject, Start Time, End Time, Duration
The Phase attribute has a number of MOptions including: Design, Manufacture, Testing, Results, Transport
I only want the attributes Start Time, End Time, and Duration to be shown if the Transport Phase is selected. I have tried using the conditional attributes
MOptions Phase = Design{1}, Manufacture{1}, Testing{1}, Results{1}, Transport{2}
and
{1} Show Attributes Edit = Author, Topic Date, Phase, Subject, Start Time, End Time, Duration
{2} Show Attributes Edit = Author, Topic Date, Phase, Subject
This works to show the attributes when the relevant Phase is selected but the Edit page shows the Phase options including the {1}/{2}. Is there are way that these conditionals are not displayed?
Also, I would like the "Duration" Atrribute to be a calculated value showing the time difference between Start Time and End Time. Is this possible?
Thanks,
Adam
|
The conditional attributes work only with Options, but not with MOptions as written in the documentation. I tried your set-up with Options and it worked ok. If you attribute Phase is non-exclusive, meaning it could be Manufacture and Testing at the same time, then you have to play some tricks with an additional attribute like
Attributes = Author, Topic Date, ..., Duration, Transport
MOptions Phase = Design, Manufacture, Testing, Results, Transport
Options Transport = Yes{2}, No{1}
{1} Show Attributes Edit = ...
{2} Show Attributes Edit = ...
An automatic calculation of Duration is unfortunately not implemented.
|
On the matter of automatic calculation of fields, it is possible using included javascript but you have to do the work yourself. For example, we have a log which computes responsivity as the ratio of a photocurrent and optical power. With log attributes called "Photocurrent", "Optical Power" and "Responsivity" there is a file in the logbooks directory called photomixer_javascript.html containing something like:
<script>
if (document.form1.Photocurrent) {
document.form1.Photocurrent.onchange = new Function(
"mod();"+
"var power = parseFloat(document.form1.Optical_Power.value);"+
"var current = parseFloat(document.form1.Photocurrent.value);"+
"if (!isNan(power) && !isNan(current) && power != 0.0) {"+
" document.form1.Responsivity.value = Math.round(current/power*100)/100.0"+
"}"
);
document.form1.Optical_Power.onchange = document.form1.Photocurrent.onchange;
}
</script>
and the elogd.cfg file includes
Bottom text = photomixer_javascript.html
for the relevant log.
The assignments to the onchange handlers are guarded because this javascript is included on all pages for that log, including the list pages where there is no such field as Photocurrent, (or Optical_Power) and the event handler function is defined dynamically for the same reason. |
66452
|
Tue Jul 21 22:29:17 2009 |
| kyle carpenter | kyle.carpenter@atmosenergy.com | Question | Windows | 2.7.6-2230 | Reply not working correct | Hi,
I love this software. I am not a programmer but have learned alot about the program.
I have 2 questions.
1. when i do a reply it will bring the original qutes with it but i have the option to change what had been entered. once i do the reply and reply to the reply i can not change the first reply but can change the second reply. This just started last week and i am not sure what has changed. i even uninstalled and reinstalled. If I try to just the HTML i tcomes up with code? If I do elcode seems to do ok just not able to stop the editing of the the last reply. Plain seems to do the same as ELcode.
2. I have also had trouble with E-Log not starting on my XP machines. Any ideas?
Thanks for sharing such a powerful program it is sweet.
Kyle |
66453
|
Wed Jul 22 08:03:28 2009 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 2.7.6-2230 | Re: Reply not working correct |
kyle carpenter wrote: |
Hi,
I love this software. I am not a programmer but have learned alot about the program.
I have 2 questions. #### This is my modification ####
1. when i do a reply it will bring the original qutes with it but i have the option to change what had been entered. once i do the reply and reply to the reply i can not change the first reply but can change the second reply. This just started last week and i am not sure what has changed. i even uninstalled and reinstalled. If I try to just the HTML i tcomes up with code? If I do elcode seems to do ok just not able to stop the editing of the the last reply. Plain seems to do the same as ELcode.
2. I have also had trouble with E-Log not starting on my XP machines. Any ideas?
Thanks for sharing such a powerful program it is sweet.
Kyle
|
Sorry but I don't get your point. See I modified your original entry above. Now I will submit this entry, and do another reply. |
66454
|
Wed Jul 22 08:05:12 2009 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 2.7.6-2230 | Re: Reply not working correct |
Stefan Ritt wrote: |
kyle carpenter wrote: |
Hi,
I love this software. I am not a programmer but have learned alot about the program.
I have 2 questions. #### This is my modification #### **** This is my second modification ****
1. when i do a reply it will bring the original qutes with it but i have the option to change what had been entered. once i do the reply and reply to the reply i can not change the first reply but can change the second reply. This just started last week and i am not sure what has changed. i even uninstalled and reinstalled. If I try to just the HTML i tcomes up with code? If I do elcode seems to do ok just not able to stop the editing of the the last reply. Plain seems to do the same as ELcode.
2. I have also had trouble with E-Log not starting on my XP machines. Any ideas?
Thanks for sharing such a powerful program it is sweet.
Kyle
|
Sorry but I don't get your point. See I modified your original entry above. Now I will submit this entry, and do another reply. **** And I can modify this ****
|
So this is my second reply. I can edit both your original entry and my first reply.
Your point 2) is too unspecific. I need more information there. You could run the elogd daemon interactively and check if there is any error output in the console window. |
66461
|
Mon Jul 27 01:39:18 2009 |
| Jay Johnstone | jay.johnstone@gmail.com | Question | Windows | 2.7.6 | Changing Entry Time | Hi,
I am new to eLog, trying to make a logbook tool. This is probably a question with a simple answer, but here it is... I need to be able to edit the entry time for an entry as it is being made and also in Edit mode later. We have field staff who use a paper log in the field and then come back to the computer later and create the log entries, and they need to be time stamped to reflect when an event happened, not when the entry is put into the log.
I'm guessing I'm missing something easy in my Config file, I've looked through the config examples and searched the forum but I couldn't come up with an example of how to make this work.
Thanks in advance!
Jay |
66462
|
Mon Jul 27 08:40:50 2009 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 2.7.6 | Re: Changing Entry Time |
Jay Johnstone wrote: |
Hi,
I am new to eLog, trying to make a logbook tool. This is probably a question with a simple answer, but here it is... I need to be able to edit the entry time for an entry as it is being made and also in Edit mode later. We have field staff who use a paper log in the field and then come back to the computer later and create the log entries, and they need to be time stamped to reflect when an event happened, not when the entry is put into the log.
I'm guessing I'm missing something easy in my Config file, I've looked through the config examples and searched the forum but I couldn't come up with an example of how to make this work.
Thanks in advance!
Jay
|
Hi Jay,
the entry time cannot be changed, because it should reflect the real time when the entry was made. What you can do in your case is to define a "datetime" attribute, which contains then the time stamp. You need something like this:
Attributes = Author, Field time, Subject
Type Field time = datetime
... |
66463
|
Mon Jul 27 09:25:06 2009 |
| Jay Johnstone | jay.johnstone@gmail.com | Question | Windows | 2.7.6 | Re: Changing Entry Time |
Stefan Ritt wrote: |
Jay Johnstone wrote: |
Hi,
I am new to eLog, trying to make a logbook tool. This is probably a question with a simple answer, but here it is... I need to be able to edit the entry time for an entry as it is being made and also in Edit mode later. We have field staff who use a paper log in the field and then come back to the computer later and create the log entries, and they need to be time stamped to reflect when an event happened, not when the entry is put into the log.
I'm guessing I'm missing something easy in my Config file, I've looked through the config examples and searched the forum but I couldn't come up with an example of how to make this work.
Thanks in advance!
Jay
|
Hi Jay,
the entry time cannot be changed, because it should reflect the real time when the entry was made. What you can do in your case is to define a "datetime" attribute, which contains then the time stamp. You need something like this:
Attributes = Author, Field time, Subject
Type Field time = datetime
...
|
Hi, Stefan,
Thanks for the quick reply, I've added that to my config and it does what we need.
Cheers, Jay |
66467
|
Tue Jul 28 02:50:42 2009 |
| Dan Duong | Dan.Duong@team.telstra.com | Question | Windows | v2.7.42111 | display GMT time instead of local time in Entry time/ Last edit field | Hi all,
I have set my PC in Time Zone GMT+10:00 but I get GMT time in Entry time/Last edit field.
I have installed in another PC. Which has Time Zone GMT+10:00 but I still get GMT time in Entry time/Last edit field.
Please help. Thank you very much.
|
|