On Mon, Jul 4, 2011 at 1:46 PM, Sarah Diehl <di...@immunbio.mpg.de> wrote: > Hello, > > in the config of a tool I want to integrate into Galaxy I would like to have > a parameter with the following properties: > > <param name="var" type="integer" label="Var" value="50" optional="true" > min="10" max="100" /> > > So it should be possible to leave this field empty, but when you choose to > enter a number it should be between 10 and 100. > The problem now is that Galaxy refuses to accept it when this field is > empty. >
Which version of Galaxy are you running? Optional float and integer parameters was only recently made possible under issue 403 with an initial fix committed two weeks ago, https://bitbucket.org/galaxy/galaxy-central/issue/403 https://bitbucket.org/galaxy/galaxy-central/changeset/adcc600effa4 > > After encountering this problem I tried to solve the issue within Cheetah > and tried the following: > > #if $var.value < 10 or $var.value > 100 > #set $var.value = "" > #end if You'd need to try something like this: #if int($var.value) < 10 or int($var.value) > 100 #set $var.value = "" #end if but you also have to first exclude the case where is is already empty as then int would fail. Peter ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/