Cade;
If you look at the select widget <https://tiddlywiki.com/#SelectWidget> as
documented;
<$select tiddler=<<qualify 'select-demo'>> default='HelloThere'>
<$list filter='[all[shadows+tiddlers]tags[]sort[title]]'>
<option value=<<currentTiddler>>><$view field='title'/></option>
</$list>
</$select>
The list if generating the options from the filter; But you can insert
other options outside the list
<$select tiddler=<<qualify 'select-demo'>> default='HelloThere'>
<option value="">--any--</option>
<$list filter='[all[shadows+tiddlers]tags[]sort[title]]'>
<option value=<<currentTiddler>>><$view field='title'/></option>
</$list>
</$select>
This may lead you to a fuller answer;
Regards
Tones
On Saturday, 3 October 2020 03:30:25 UTC+10, Cade Roux wrote:
>
> Is there an equivalent of a "constant" operator for a filter that doesn't
> effect the tiddler being selected?
>
> I want the subfilter to allow all tiddlers through if the dropdown is the
> "All Tiddlers" item that has the value "--any--" or allow only tiddlers
> through if the customer tags field contains the selected dropdown value.
>
> i.e. the logical equivalent of
> {$:/state/dropdownvalue} = "--any--"
> OR
> contains:customtagsfield{$:/state/dropdownvalue}]
>
> Currently I have worked around this by putting [[--any--]] in all the
> custom tags fields and using this subfilter:
>
> \define selectedindropdown()
> [contains:customtagsfield{$:/state/dropdownvalue}]
> \end
>
> I'd like to eliminate having to have the [[--any--]] in all the tags
> fields.
>
> Something like this which doesn't select or alter the tiddler coming into
> the subfilter in any way, but either allows it through or not based on an
> unrelated condition.
>
> \define selectedindropdown()
> [constant[--any--]{$:/state/dropdownvalue}
> contains:customtagsfield{$:/state/dropdownvalue}]
> \end
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/9c555d9a-97c5-4c6d-b28f-30b17b1681ddo%40googlegroups.com.