it turns out that in any filter written as

 filter="[[whatever_selection_here]title[xyzxyz]]"

all the selection preceding the step with tiddler's title is dropped and 
only that title is retained and passed on to the next step -if there is 
any. (And this wheter any xyzxyz tiddler exists or not by the way).

so for example 

 filter="[tag[bar]title[foo]]"

outputs foo, even if tiddler foo has no 'bar' tag at all, and even if 
tiddler foo doesn't exist. This explains the apparently strange behavior 
above, and it is also quite counter-intuitive (one would intuitively expect 
the filter to output all the tiddlers -zero or one actually- that match 
title 'foo' and are tagged 'bar') so this behavior would deserve to be  
highlighted strongly in the documentation IMHO.

On Saturday, October 16, 2021 at 7:01:53 PM UTC+3 CarloGgi wrote:

> with reference to my previous post, no need to say neither this code works 
> for the inner filter:
> <$set name='my_tiddler' value='tiddler-X'>
> ...
>        filter="[enlist{!!my_tiddlers_list}<my_tiddler>]">
>
> nor this:
>
> <$set name='my_tiddler' value='tiddler-X'>
> ...
>        filter="[[enlist{!!my_tiddlers_list}]<my_tiddler>]">
>
> they both always output the value of <<my_tiddler>>, whether it was 
> included in my_tiddlers_list or not.
>
> On Saturday, October 16, 2021 at 6:51:15 PM UTC+3 CarloGgi wrote:
>
>> Hallo again,
>> I have some tiddlers with a special field, call it 'my_tiddlers_list' 
>> that stores, not hard to guess, a list of other tiddlers. By 'list' I mean 
>> to say the result of an <$action-listops xxx subfilter> widget, which is 
>> indeed some 'collection' of items separated by whitespace. I don't know if 
>> that's a 'list' in the sense of a type of variable (does TW have any 
>> variable types after all? It seems it doesn't).
>> Anyway, how do I go to check if a given tiddler 'tiddler-X' is included 
>> in the list of tiddlers stored into field 'my_tiddlers_list' of a[ny] 
>> tiddler? When I transclude the reference to 'my_tiddlers_list' as in 
>> {{!!my_tiddlers_list}}what i get is a unique 'string'. How do I split it up 
>> into its single member items? And once split the string into tokens (its 
>> member items), ho do I perform the comparison check?
>>
>> So far, I came up with this very beginner-level code (I'm sure there are 
>> more elegant, concise ways to write it, merging the two filters into a 
>> single one and getting rid of one of the <$list> cycles) that tries to 
>> exploit 'enlist' operator. I leave some parts as 'pseudocode' because I 
>> don't know how to write them:
>>
>> <$set name='my_tiddler' value='tiddler-X'>
>>
>> <$list  filter="[tag[mytag]has:field[my_tiddlers_list]]" >
>>        <$list 
>> filter="[enlist{!!my_tiddlers_list}canIDoTheComparisonHere?]">
>>                 orShallICompareHere? AndIfSo,How?
>>        </$list>      
>> </$list>
>>
>> </$set>
>>
>> but have no clue if I'm going the right way and how to do the comparison 
>> check.
>>
>> Writing inner filter as filter="[enlist{!!my_tiddlers_list}[tiddler-X]]" 
>> doesn't work, nor does it work writing it as 
>> filter="[[enlist{!!my_tiddlers_list}][tiddler-X]]". In both cases I get 
>> <<currentTiddler>> valued as tiddler-X, regardless if it is included in 
>> my_tiddlers_list's list or not. For God's sake: why? And how do I write the 
>> check? 
>>
>> Thanks for helping,
>> CG
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9576e64a-8d12-46a5-9688-bf8a2dd9b3a8n%40googlegroups.com.

Reply via email to