Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Subst Attributes..., posted by Francois Cloutier on Fri May 1 21:19:18 2015 
    icon2.gif   Re: Subst Attributes..., posted by Andreas Luedeke on Mon May 4 13:23:55 2015 
       icon2.gif   Re: Subst Attributes..., posted by David Pilgram on Mon May 4 14:10:08 2015 
          icon2.gif   Re: Subst Attributes..., posted by David Pilgram on Mon May 4 15:13:08 2015 
    icon2.gif   Re: Subst Attributes..., posted by Stefan Ritt on Mon May 4 15:44:07 2015 
       icon6.gif   Re: Subst Attributes..., posted by Francois Cloutier on Mon May 4 16:03:19 2015 
          icon2.gif   Re: Subst Attributes..., posted by Andreas Luedeke on Tue May 5 09:22:23 2015 
Message ID: 67876     Entry time: Tue May 5 09:22:23 2015     In reply to: 67872
Icon: Reply  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Question  OS: Windows  ELOG Version: V3.1.0-5be 
Subject: Re: Subst Attributes... 
> 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)
ELOG V3.1.5-fe60aaf