mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
If the `Set value for this optional select field ? `switch is set to no we serialize the value as `null` instead of `""`, which is especially important in optional select fields, where `""` may correspond to an option that is distinct from not setting a value. I have only enabled this for select parameters that are cast to text parameters, but I think this discrimination between set and unset would also be great for optional text parameters. There might be a better way to do it in the UI (maybe some icon that indicates that the value is set, that can be toggled with an backspace when the field is empty?), but I think this will do for the relatively rare case of optional select parameters that are cast to text fields. Fixes https://github.com/galaxyproject/galaxy/issues/12081
22 lines
848 B
XML
22 lines
848 B
XML
<tool id="select_from_dataset_optional" name="select_from_dataset_optional" version="0.1.0" profile="21.05">
|
|
<description>Create dynamic options from data sets</description>
|
|
<command><![CDATA[
|
|
echo select_single '$select_single' > '$output'
|
|
]]></command>
|
|
<inputs>
|
|
<param name="single" type="data" optional="true" format="tabular" label="single"/>
|
|
<param name="select_single" type="select" optional="true" label="select_single">
|
|
<options from_dataset="single">
|
|
<column name="name" index="1"/>
|
|
<column name="value" index="0"/>
|
|
<validator type="no_options" message="No data is available in single" />
|
|
</options>
|
|
</param>
|
|
</inputs>
|
|
<outputs>
|
|
<data name="output" format="txt" />
|
|
</outputs>
|
|
<help>
|
|
</help>
|
|
</tool>
|