Hi Josh,

Thanks for reporting this issue. I've opened a bitbucket ticket for the same. You can track it here: http://bitbucket.org/galaxy/galaxy-central/issue/305/potential-bug-in-dynamics-option-filters

Thanks,
Guru
Galaxy team.

On Mar 17, 2010, at 2:44 PM, Lee, Joshua wrote:

Hi,
 
I’m trying to create a tool where there are several select parameters whose choices are determine by the previous parameter(s). I have a toy example with three parameters: Category, Food, and Prep method. Depending on the chosen Category, only certain Foods are shown, which in turn determines which Prep methods are available.
 
I’m trying to use the <options> tag with the “from_file” attribute. I have one column per parameter and one row per valid combination.
 
My problem is that the front end can get into a state where a certain valid combinations will be unselectable. In the example below, I can never select “Fruit”, “Kiwi”, and “Raw”. When I change the 1st select, the values for the 2nd select are loaded, but the values for the 3rd select cannot be updated. This is particularly problematic if there is only one choice for the 2nd select, because I cannot get it’s “onchange” handler to fire (so the 3rd select is always empty).
 
In my case, it would be nice if the first value of the 2nd select is chosen as a default, and the 3rd select is populated accordingly.
 
Any help would be appreciated. Perhaps I’m not using these features as intended, but it seemed like a natural application.
 
Thanks,
Josh
 
My data file looks like:
Meat    Chicken Fried
Meat    Chicken Grilled
Meat    Beef    Grilled
Meat    Beef    Stir-fried
Veg     Carrot  Boiled
Veg     Fennel  Raw
Fruit   Kiwi    Raw
 
And my tool’s <inputs> section is:
 
  <inputs>
    <param name="paramA" type="select" label="Category">
      <options from_file="test_select_options.txt">
        <column name="value" index="0"/>
        <column name="name" index="0"/>
        <filter type="unique_value" name="unique" column="0"/>
      </options>
    </param>
 
    <param name="paramB" type="select" label="Food" >
      <options from_file="test_select_options.txt">
        <column name="value" index="1"/>
        <column name="name" index="1"/>
        <filter type="unique_value" name="unique" column="1"/>
        <filter type="param_value" ref="paramA" name="A" column="0"/>
      </options>
    </param>
 
    <param name="paramC" type="select" label="How prepared">
      <options from_file="test_select_options.txt">
        <column name="value" index="2"/>
        <column name="name" index="2"/>
        <filter type="param_value" ref="paramA" name="A" column="0"/>
        <filter type="param_value" ref="paramB" name="B" column="1"/>
      </options>
    </param>
 
  </inputs>
_______________________________________________
galaxy-dev mailing list
galaxy-dev@lists.bx.psu.edu
http://lists.bx.psu.edu/listinfo/galaxy-dev

Guruprasad Ananda
Graduate Student
Bioinformatics and Genomics
The Pennsylvania State University