Dynamic Filters in One Go

by @Mohammad

This post was moved here by mistake, sorry!

See Regexp Search and Replace for Words with Dash (Hyphen)

2 posts were merged into an existing topic: Regexp Search and Replace for Words with Dash (Hyphen)

For anybody who might not find it obvious…

<$list filter={{{ whatever }}} ....

“whatever” gets evaluated as-is by the wrapping triple squirley brackets.

The resulting string is the filter that gets evaluated by the list widget.

So we have a two-stage thing going on OR, we can call it a dynamic filter for a list widget.

Thank you @Charlie_Veniot , this is a great tip.

Example: Open https://tiddlywiki.com, create a tiddler with below content

<$button actions="""<$action-listops $tiddler=<<currentTiddler>> $field=condition $subfilter="+[toggle[1],[2]]" />""" >
Toggle
</$button>

<$let
	f01="[tag[Learning]first[5]]"
	f02="[tag[HelloThere]first[5]]" >

<$list filter= {{{ [{!!condition}match[1]then<f01>else<f02>] }}} >

</$list>

</$let>

This ill toggle the filter on click, a dynamic filter will be created each time you click.

A post was merged into an existing topic: Regexp Search and Replace for Words with Dash (Hyphen)