Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   How to make two attributes reacting with each other, posted by Xuan Wu on Thu Jan 5 12:55:05 2017 
    icon2.gif   Re: How to make two attributes reacting with each other, posted by Stefan Ritt on Thu Jan 5 13:24:06 2017 
       icon2.gif   Re: How to make two attributes reacting with each other, posted by Xuan Wu on Thu Jan 5 14:04:13 2017 
          icon2.gif   Re: How to make two attributes reacting with each other, posted by Stefan Ritt on Thu Jan 5 14:13:07 2017 
             icon2.gif   Re: How to make two attributes reacting with each other, posted by Xuan Wu on Thu Jan 5 14:23:08 2017 
                icon2.gif   Re: How to make two attributes reacting with each other, posted by Stefan Ritt on Thu Jan 5 14:35:22 2017 
                   icon2.gif   Re: How to make two attributes reacting with each other, posted by Xuan Wu on Thu Jan 5 14:40:59 2017 
                      icon2.gif   Re: How to make two attributes reacting with each other, posted by Andreas Luedeke on Fri Jan 6 10:22:24 2017 
                         icon14.gif   Re: How to make two attributes reacting with each other, posted by Xuan Wu on Fri Jan 6 11:05:18 2017 
Message ID: 68533     Entry time: Fri Jan 6 10:22:24 2017     In reply to: 68532     Reply to this: 68534
Icon: Reply  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Question  OS: Linux  ELOG Version: 3.1.2 
Subject: Re: How to make two attributes reacting with each other 

IOptions does not support conditional attributes.

I think the proper solution would be to remove the icon selection field from the input form:

Show Attributes Edit = Author, Author Email, Category, System, Subject

The user would then only be able to edit the Category, the Icon would always be set accordingly. I would think that this would be the appropriate behaviour.

Cheers, Andreas

Xuan Wu wrote:

What I mean is that, when I select a catagory, the icon will change. If I change the icon, I need the catagory change too. 

Stefan Ritt wrote:

If you select a (different) category, the current icon setting simply gets overwritten, what ever it was before.

Xuan Wu wrote:

Sorry for my carelessness. What you said is definitely right. I just wonder how can Icon and Catagory change simultaneously whatever which one be selected first.

Stefan Ritt wrote:

The example I gave you worked for me, I actually tested it. Please note that it contains

Options Category = ...

and not

ROptions Category = ...

 

Stefan

Xuan Wu wrote:

Thanks for your quick reply! I just test what you suggested, even I test {1} Preset on edit Icon = icon1.gif, they both didn't work.

Stefan Ritt wrote:

You can do that with conditional attributes (see documentation):

 

Attributes = Author, Author Email, Icon, Category, System, Subject
Options Category = Shift Summary{1}, Report{2}, Reply{3}, Fault{4}, Issue{5}, Resolved{6}, Maintenance{7}
IOptions Icon = icon1.gif, elc_list.png, icon3.gif, icon8.gif, icon4.gif, icon14.gif, elc_anchor.png

{1} Preset Icon = icon1.gif
{2} Preset Icon = elc_list.png
{3} Preset Icon = icon3.gif
{4} Preset Icon = icon8.gif
{5} Preset Icon = icon4.gif
{6} Preset Icon = icon14.gif
{7} Preset Icon = elc_anchor.gif

Icon comment icon1.gif = Shift Summary
Icon comment icon3.gif = Reply
Icon comment icon4.gif = Issue
Icon comment icon8.gif = Fault
Icon comment icon14.gif = Resolved
Icon comment elc_list.png = Report
Icon comment elc_anchor.png = Maintenance

 

 

Xuan Wu wrote:

Hi all,

I have two attributes defined like following

Attributes = Author, Author Email, Icon, Category, System, Subject

ROptions Category = Shift Summary, Report, Reply, Fault, Issue, Resolved, Maintenance

IOptions Icon = icon1.gif, elc_list.png, icon3.gif, icon8.gif, icon4.gif, icon14.gif, elc_anchor.png

Icon comment icon1.gif = Shift Summary
Icon comment icon3.gif = Reply
Icon comment icon4.gif = Issue
Icon comment icon8.gif = Fault
Icon comment icon14.gif = Resolved
Icon comment elc_list.png = Report
Icon comment elc_anchor.png = Maintenance

When the Shift Summary category being selected, I wish the icon1.gif Icon being selected automaticlly, as well as when icon8.gif being selected, Fault category be selected. How can I get this? Any advice or suggestions will be appreciated.

Cheers,

Xuan

 

 

 

 

 

 

 

ELOG V3.1.5-3fb85fa6