Sorry I didn't see this, Patrick. I hope you found a solution -- but that
looks like a symptom of the fact that the currentTiddler variable
<https://tiddlywiki.com/#currentTiddler%20Variable> doesn't get set
automatically in the sidebar. So you're looking for a searchterm (or
search?) field on a tiddler that doesn't exist.
One approach is to set a named state tiddler for your edit-text widget to
use (so you're not relying on a currentTiddler), then include that name in
the filter ( [tag{statetid!!search}]). Another would be to set the
currentTiddler variable using transclusion -- rather than putting your
search tiddler straight into the sidebar, put a tiddler that transcludes it
in the sidebar. More about how transclusion affects currentTiddler at
tiddlywiki.com <https://tiddlywiki.com/#Transclusion%20with%20Templates>.
Best,
Chris
On Monday, June 21, 2021 at 8:00:48 PM UTC-4 [email protected] wrote:
> That's brilliant, thanks so much. It works, but (weirdly?) not if I have
> the date sorting, and not if the tiddler is put into the sidebar (the
> search field field doesn't get filled!)
>
> <$edit-text field="search" default="" placeholder="enter text to search"
> tag="input"/>
> <br>
> search is {{!!search}}
> <br>
> *<<timeline-vertical filter:"[tag{!!searchterm}]" limit:4>>*
>
>
> However, this is nearly there and I'm very grateful ;-)
> On Monday, 21 June 2021 at 16:34:25 UTC+1 clutterstack wrote:
>
>> Or I should specify "you can *transclude* a text reference using curly
>> brackets" since this can be a bit messy to keep straight.
>>
>> Docs: https://tiddlywiki.com/#TextReference
>>
>> On Monday, June 21, 2021 at 11:28:33 AM UTC-4 clutterstack wrote:
>>
>>> Hi Patrick,
>>>
>>> Sorry if I'm misinterpreting. You can use a text reference in a filter
>>> with curly brackets.
>>>
>>> It looks as though you're using Mohammad's timeline macros. I went to
>>> https://kookma.github.io/TW-Timelines/ and made a new tiddler to test
>>> your example. Adding the following gave me a timeline:
>>>
>>> <<timeline-vertical filter:"[tag{!!search}sort[date]]" >>
>>>
>>> Hope that helps,
>>> Chris
>>> On Monday, June 21, 2021 at 7:47:05 AM UTC-4 [email protected] wrote:
>>>
>>>> Matybe I wasn't clear enough....
>>>>
>>>> I can get input into a field ("search") and assign it to a variable eg.
>>>>
>>>> \define thisList()
>>>> <$list filter="[tag[$(TestVariable)$]]">
>>>> \end
>>>> <$set name=TestVariable value={{!!search}}>
>>>> TestVariable is <<TestVariable>>
>>>> This list is <<thisList>>
>>>> <br>
>>>> </$set>
>>>>
>>>> <$edit-text field="search" default="" placeholder="enter text to
>>>> search"
>>>> tag="input"/>
>>>> <br>
>>>>
>>>> this will list all tiddlers tagged with the value of the field "search"
>>>>
>>>> but I can't work out how to use that search term in another existing
>>>> macro as a filter such as....
>>>>
>>>> <<timeline-vertical filter:"[tag[search]sort[date]]" date:"date">>
>>>>
>>>> or
>>>>
>>>> <<timeline-vertical filter:"[tag[search] sort[date]]"
>>>> search:"$(search)$" date:"date">>
>>>>
>>>> any ideas please?
>>>> On Friday, 18 June 2021 at 00:11:12 UTC+1 Patrick RB wrote:
>>>>
>>>>> It look's like this is a common issue for newbies, but I'm using
>>>>> timelines plugin to display tiddler filtered by tags (in this case
>>>>> "snippet")
>>>>>
>>>>> <<timeline-vertical filter:"[tag[snippet]sort[date]]" date:"date"
>>>>>
>>>>> To aid quick searches and avoid editing the tiddler I have created a
>>>>> text box input to set a field to inject input into tag[.....] and a
>>>>> custom
>>>>> date field
>>>>>
>>>>> I can create, set and check the search field has the expected text,
>>>>> but cannot get the timelines macro to accept the search field text,
>>>>> though
>>>>> the date field works fine.
>>>>>
>>>>> can any of you real developers help? Thanks!
>>>>>
>>>>>
>>>>>
--
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/58a7a58a-d758-4e9c-b18c-c3b1a20f2d32n%40googlegroups.com.