Re: Subst Attributes..., posted by Andreas Luedeke on Tue May 5 09:22:23 2015
|
> Wow !!! Im impressed :):):) I didn't expect such a fast reply !!!
>
> Thanks alot Stefan, I will try it right away !!
>
> Andreas, I really like the idea of hiding attrib 1 and attrib2 and fill attrib3 with a script (I guess using elog.exe command line) ?
> I play a little with it and I can modify an attribute with the command line but I cant figure how to set the cell style based on the attrib2 and
> replace attrib3 value with attrib1 value... (basically I need help !!!) do you think you could help me ?
The downside of a script is, that it needs to execute on the server: you need to have the proper syntax for the shell of your operating system.
Here's a little example for a bash shell script, just to give you an idea (that would be for Linux, I have no experience with Windows):
Allow HTML = 1
Attributes = person, mood, color
Default encoding = 2
Options person = John, Bill, Kate
Options mood = calm, upset
Subst color = $shell(if [ "$mood" == "calm" ] ;then echo "green"; else echo "red";fi)
Change person = <font color="$color">$person</font>
List Change person = <font color="$color">$person</font>
Show Attributes = person, mood
Show Attributes Edit = person, mood
List display = ID, Date, person
Disclaimer: When I've tested it locally the HTML was displayed as source. Stefan, any idea? (ELOG V3.1.0-5be245e) |
Re: Load attribute options from attributes in another logbook, posted by Andreas Luedeke on Tue May 5 10:54:54 2015
|
> Hi again,
> Hope I'm not draining to much time from you guys !
>
> here is the scenario (fake one just to understand the logic..):
> My main logbook as a Option attribute Called "Electrician availables"
> My second logbook is a list of workers and there capacities Moptions : "Electrician", "Plumber", "Genius"
>
> So my question is:
>
> Is it possible to load my main logbook attribute "Electrician availables" Options based on all the "Electrician" found under my second logbook ?
>
> Thanks :)
I think that this is neither possible nor reasonable. Of course everything is possible with shell- and java-scripting, but that would be a software
package on top of ELOG.
Keep in mind we are talking about an electronic logbook here, not about a relational database.
Cheers
Andreas |
Preloading Options or Moptions from a text file or CSV, posted by Francois Cloutier on Wed May 6 21:25:34 2015
|
Title says all :)
Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
Thanks :) |
Re: Preloading Options or Moptions from a text file or CSV, posted by Stefan Ritt on Wed May 6 21:30:13 2015
|
> Title says all :)
>
> Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
>
> Thanks :)
Quick and simple answer: No.
But please explain me what your case is. Maybe this can be done differently. |
Re: Preloading Options or Moptions from a text file or CSV, posted by Francois Cloutier on Thu May 7 02:25:16 2015
|
> > Title says all :)
> >
> > Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
> >
> > Thanks :)
>
> Quick and simple answer: No.
>
> But please explain me what your case is. Maybe this can be done differently.
That's clear :)
So basically, I have a list of 5-10 workers. I'll have to choose one for each entry I make into the logbook. But these workers will change from time to time
(students) and I don't want the staff to manipulate the config file manually..("Extendable options" is not an option as I will get to many "Darth Vader" entry for
sure..)
I asked if I could populate that option box from another logbook attribute and Andreas told me only possible via external scripts.
https://midas.psi.ch/elogs/Forum/67877
I investigate a little but I found that :
a) I couldn't make shell command to execute while elogd was running as a service (I'm running windows and $shell was just returning weird stuff ); shell script was
working only when I launch elogd.exe from a command line:
-elogd as a Service running the following : Subst Infographiste = $shell(dir c:\)
will return : Shell execution not enabled via -x flag
-modifying the Windows Service to add "-X" and running the following :Subst Infographiste = $shell(dir c:\)
will return : a empty attribute
-running elogd "-x" from a command line, the following : Subst Infographiste = $shell(dir c:\)
will return : the dir result..
(I also tried to change under witch user the service was running..)
b) I just couldn't figure how to build that script....
But that would be so nice ! I can see so many situations where I could use such a scenario (loading options from another logbook or from a txt/csv file
somewhere...)
Thanks,
:) |
Re: Preloading Options or Moptions from a text file or CSV, posted by Stefan Ritt on Thu May 7 09:48:32 2015
|
Forget scripting under Windows, this is painful and not really working. Wrong OS for that.
But have you considered conditional attributes? With this you can load different option lists straight from the elogd.cf file. Use something like this:
Attributes ..., List, Person
Options List = List A{1}, List B{2}
{1} Options Person = Person a1, Person a2, ...
{2} Options Person = Person b1, Person b2, ...
So if you choose either "List A" or "List B", you get a different set of persons. Is it that what you want?
/Stefan
> a) I couldn't make shell command to execute while elogd was running as a service (I'm running windows and $shell was just returning weird stuff ); shell script was
> working only when I launch elogd.exe from a command line:
>
> -elogd as a Service running the following : Subst Infographiste = $shell(dir c:\)
> will return : Shell execution not enabled via -x flag
>
> -modifying the Windows Service to add "-X" and running the following :Subst Infographiste = $shell(dir c:\)
> will return : a empty attribute
>
> -running elogd "-x" from a command line, the following : Subst Infographiste = $shell(dir c:\)
> will return : the dir result..
>
> (I also tried to change under witch user the service was running..)
>
> b) I just couldn't figure how to build that script....
>
> But that would be so nice ! I can see so many situations where I could use such a scenario (loading options from another logbook or from a txt/csv file
> somewhere...)
>
> Thanks,
>
> :) |
Re: Preloading Options or Moptions from a text file or CSV, posted by Francois Cloutier on Thu May 7 14:37:39 2015
|
Not really...
The thing is I have to let some users the capacity of changing the content of that option list.. I was hoping there could be a different way for
them then to edit the cfg file...
That why I came up at first ask if it could be possible to load an Option list from the content of another logbook... that way I could have made
up some sort of "worker" logbook that would have feed the main logbook Attribute "workers" options list.
> Forget scripting under Windows, this is painful and not really working. Wrong OS for that.
>
> But have you considered conditional attributes? With this you can load different option lists straight from the elogd.cf file. Use something
like this:
>
> Attributes ..., List, Person
>
> Options List = List A{1}, List B{2}
> {1} Options Person = Person a1, Person a2, ...
> {2} Options Person = Person b1, Person b2, ...
>
> So if you choose either "List A" or "List B", you get a different set of persons. Is it that what you want?
>
> /Stefan
>
>
> > a) I couldn't make shell command to execute while elogd was running as a service (I'm running windows and $shell was just returning weird
stuff ); shell script was
> > working only when I launch elogd.exe from a command line:
> >
> > -elogd as a Service running the following : Subst Infographiste = $shell(dir c:\)
> > will return : Shell execution not enabled via -x flag
> >
> > -modifying the Windows Service to add "-X" and running the following :Subst Infographiste = $shell(dir c:\)
> > will return : a empty attribute
> >
> > -running elogd "-x" from a command line, the following : Subst Infographiste = $shell(dir c:\)
> > will return : the dir result..
> >
> > (I also tried to change under witch user the service was running..)
> >
> > b) I just couldn't figure how to build that script....
> >
> > But that would be so nice ! I can see so many situations where I could use such a scenario (loading options from another logbook or from a
txt/csv file
> > somewhere...)
> >
> > Thanks,
> >
> > :) |
RSS Feed Not Providing Time Stamps For datetime Attributes, posted by Kamen Nikolov on Fri May 8 00:18:12 2015
|
Hello,
I am using the RSS feed feature of Elog (V2.9.0-2396). I have a couple of attributes of type "datetime" (Start Time and Stop Time). I don't have a "Time Format" statement, so just using the default format. I am passing the Start Time and Stop Time attributes to the RSS Title with $Start Time and $Stop Time, but when looking at the RSS title in IE11 browser, I only see the date and not the time. Is there any way I can see the time as well?
Additional info:
I'm also passing the creation time of the Elog with $entry time and this is displaying correctly (both date and time).
Please let me know if I am doing something incorrectly?
Thanks |
|