Is it possible to step by step build and save a filter into the text field of a state tiddler using select widget.
Filter will have multiple operator and parameters. Separate select widgets can be used for operators and parameters of the each step of the filter . Opening and closing brackets needs to be added.
Thanks for sharing it. There are a few similar post in the forum. Let me read through them and experiment.
One small doubt.
Suppose I have two select widgets which is used to add data to the text field of the same tiddlerā¦is there any way I can add the data using the second select widget without overwriting the data added previously by the first select widget.
Iād say this is used in some of the editor tools, for example the stamp tool. I think it is a matter of having a filter take the current content and dominantly append the new stuff and then set the field to this new value.
TiddyWiki xpās FilterBuilder (the wiki itself is mostly in Chinese, but that particular tiddler is all English, and the rest of the site translates well)
Re: your specific question: You can use the actions attribute of a $select widget to modify a separate field (or tiddler). For instance, you could define an $action-setfield widget to modify/append your selection(s) to the existing filter, as Mat suggests.
In theory, I suppose you could use actions on a $select to further modify the field where it stores its selection, but I really wouldnāt recommend it.
Any changes to the field defined by the $select field= attribute will remove the record of your last selection, and this will make it difficult to replace or remove a specific piece of the composite filter.
I have updated the demo with another version which save the operators and parameters of the filter steps into fields first using select widget and then into the text field using another button.
I have checked the tiddlytools and xp versions before, but those are huge codes and may not suit mineā¦
Can you tell me when to use subfilter operator and filter run prefixes. I havenāt used those much and is confused when to use them.
This is intriguing⦠You mean, instead of a story river displaying a simple list, we have a āfilter riverā that automatically shows tiddlers (full tiddlers, with all their view template cascade etc.) matching the filter condition specified (in a sidebar or menubar, etc.).
Iām intrigued by this idea. Still, there might be different ideas about how to handle links that point to a tiddler outside the filter condition. Should filter condition update (to include the new tiddler as an add-on at the end)? Or should the extra tiddler get a different status (above filter river, or below it, etc, or perhaps it opens only in a pop-up/hover state). I think thereās lots of room for variation and creativity in how a river of tiddlers might reflect a special and dynamic relation to a filterā¦
This reminds me of a plugin for TW Classic, from over 10 years ago, maybe 15. If I recall, the idea was to select/check one tag at a time to gradually narrow down search results in a list. There was a lot of community hype around it as it was being built by someone in the community. Unfortunately I cannot recall the name of the plugin nor of the creator. Any other old timers here who remember?
Rethink this tonight, I decided that filter should happened inside a tiddler with a sub-storyriver. So the search result is contained in a temp tiddler with tw-xp style filter builder on top, sub-river on bodyā¦
And the main river is still the standard way. So you can quick create new tiddler to add to it. Just like fsnotes.
I have created storyriver inspired by card like ui of heptabase with a filter builder at the top to modify the tiddlers opened in the storyriver. There are buttons and keyboard shortcuts to modify the width and height of the card tiddlers.