I've been trying a few things to the extent that I've forgotten how to do basic things (= or ==?, " or \"?)... the overall aim is to have a dashboard panel show only if any input textbox has a value. (If they're all blank, I want to hide it).
<input type="text" token="pIP" searchWhenChanged="true">
<label>Enter IP Address</label>
<change>
<condition match="$pIP$=="" AND $pHost$==""">
<unset token="X"></unset>
But I can't get the token to unset, and I guess it's the speech marks that I'm getting wrong, so I've been trying different ways to get the condition match to work, but haven't got it right yet.
<condition match="$pIP$='' AND $pHost$=''"> <!--single-quote marks-->
or
<condition match="$pIP$=='' AND $pHost$==''">
@VexenCrabtree Use this for unsetting your token in case both the inputs are blank and for setting when either is not blank.
<condition match='$field1$="" AND $field2$="" '>
<unset token="X"></unset>
</condition>
<condition match=' $field1$!="" OR $field2$!="" ' >
<set token="X">1</set>
</condition>
@VexenCrabtree Use this for unsetting your token in case both the inputs are blank and for setting when either is not blank.
<condition match='$field1$="" AND $field2$="" '>
<unset token="X"></unset>
</condition>
<condition match=' $field1$!="" OR $field2$!="" ' >
<set token="X">1</set>
</condition>
Ha ha ha, that's it! Using single-quotes for the outside means that the =="" works, whereas ='' wasn't working.
Hi @VexenCrabtree,
You can just use depends
on that panel and put two tokens there as a condition. If both are set the panel show, else it doesnt :
<panel depends="$Condition1$,$Condition2$">
No need to use condition or any additional logic here.
Cheers,
David
I want it to show if $Condition1$ is set OR if $Condition2$ is set.
In that case. Just reverse your logic like this :
<condition match=" $pIP$=="*" OR $pHost$=="*"">
<set token="X"></set>
I like the idea! Logically, that's sound for that particular , however, there are other things I need to do if just one is set but not the other, and unfortunately your suggestion stops me from being able to differentiate. I'd have to build some exponentially complicated