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/8825afc3-ec4e-4913-8e47-c4cc09427c14n%40googlegroups.com.

Reply via email to