Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   can one use a IOption field for conditional tests?, posted by FX FRERE on Tue Feb 9 18:54:22 2010 
    icon2.gif   Re: can one use a IOption field for conditional tests?, posted by Stefan Ritt on Fri Mar 12 11:26:27 2010 
Message ID: 66751     Entry time: Fri Mar 12 11:26:27 2010     In reply to: 66707
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Question  OS: Windows  ELOG Version: 2.7.8-2280 
Subject: Re: can one use a IOption field for conditional tests? 

FX FRERE wrote:

Hi again,

I was wondering if one could use a conditional statement on an IOption attribute? Indeed i try to do a visual logbook (a green check for OK result, a red cross for NOK result), unfortunately i cannot refer to the attributes value for conditional test, e.g:

IOptions Status= "Delete-icon.png" {1}, "Check-icon.png"{2}
Icon comment Delete-icon.png = Failed
Icon comment Check-icon.png = OK

{1} Show Attribute Edit = Attribute1, Attribute2

Thread Icon = Status

Attribute1 and 2 do not have any sense if the result was successful,

ELOG interprets the {1} and {2} as being part of the icon name!

thanks again for your help

FX

Conditions won't work for IOption attributes. You need an additional attribute like:

Attributes = Status, Subject, Icon
Options Status = OK{1}, Failed{2}
Ioptions Icon = icon1.gif, icon2.gif

{1}Preset icon = icon1.gif
{2}Preset icon = icon2.gif
 
ELOG V3.1.5-3fb85fa6