Add/Remove Specific Text String From Tiddlers

So, I have a custom wiki and I’m working on a Checkbox Tiddler Selector I am trying to essentially create a filter of all checked tiddlers, currently I am doing this with tags however this method creates some issues, as the system is used to export/preview/send tiddlers the tag modifies the tiddler and is essentially orphaned when sent to a new wiki or an existing one.

What I’m wanting is to create a single filter tiddler, then when a tiddler is checked the filter tiddler has a new snippet of text added for example

Tiddler 1 [Checked]
Tiddler 2 [Checked]
Tiddler 3 [Unchecked]

Filter Tiddler:
[[Tiddler 1]] [[Tiddler 2]]

If Tiddler 1 is Unchecked I want the filter tiddler to then appear with only [[Tiddler 2]]. Any ideas for this dynamic filter/selector?

It’s not clear to me what you mean by a “checked tiddler” or “when a tiddler is checked.”

Here is one approach that makes a guess at that:

CheckboxTiddlerSelector.json (1.3 KB)

title: Filter Tiddler

[[Tiddler 1]] [[Tiddler 2]]
title: Check Handlers

\define checkActions() <$action-listops $tiddler="Filter Tiddler" $field="text" $subfilter={{{ [<currentTiddler>format:titlelist[]] }}}/>
\define uncheckActions() <$action-listops $tiddler="Filter Tiddler" $field="text" $subfilter={{{ [<currentTiddler>format:titlelist[]addprefix[-]] }}}/>
title: Tiddler 1
checked: yes

<$checkbox field="checked" checked="yes" unchecked="no" checkactions=<<checkActions>> uncheckactions=<<uncheckActions>> > Check Me</$checkbox>
title: Tiddler 2
checked: yes

<$checkbox field="checked" checked="yes" unchecked="no" checkactions=<<checkActions>> uncheckactions=<<uncheckActions>> > Check Me</$checkbox>
title: Tiddler 3
checked: no

<$checkbox field="checked" checked="yes" unchecked="no" checkactions=<<checkActions>> uncheckactions=<<uncheckActions>> > Check Me</$checkbox>

If Tiddlers 1 - 3 could get a common tag or other identifier, we could move that CheckboxWidget into a ViewTemplate, and we could include a startup action to create the text for Filter Tiddler.

This has a serious deficiency, though, in that if we set the checked field to true manually, our action would not fire.

I doubt this solves your problem directly, but perhaps it’s a step in that direction.

Try this:

title: test-index-filter

\define target() ExampleIndex

<$list filter="[tag[my-test]]">
<$checkbox tiddler=<<target>> index=<<currentTiddler>> checked="selected"  default="" uncheckactions=<<uncheckActions>>> <<currentTiddler>></$checkbox><br>
</$list>

test-index-dictionary.json (939 Bytes)