filter question: search for a common title in two or several list field

39 views
Skip to first unread message

Mohammad

unread,
Dec 26, 2019, 9:04:08 AM12/26/19
to TiddlyWiki
  • tiddler Tid01 has a list field with values like
    • aa bb [[cc and spave]] dd
  • tiddler Tid02 has a list field with values like
    • uu xx [[tt with space]] dd kk
  • a user value is given and it is desired to be checked if it is listed in both Tid01 and Tid02 list fields

One solution may be like this

<$vars tidA="Tid01" tidB="Tid02" x="user value">
<$list filter="[<tidA>contains<x>] [<tidB>contains<x>] +[count[]match[2]]">
it is in both tiddler list field
</$list>
</$vars>

Note: for generality the $vars is used here. For example if user value is dd, then the $list widget shall return "it is in both tiddler list field"

What is the more efficient alternative?

--Mohammad

Mohammad

unread,
Dec 26, 2019, 9:05:18 AM12/26/19
to TiddlyWiki
How about searching and checking several user values at the same time?

--Mohammad

TonyM

unread,
Dec 26, 2019, 6:52:58 PM12/26/19
to TiddlyWiki
Mohammad

What do you mean "more efficient"?

I can imagin a few ways to make it more suited to more variables or easier to read the code etc but I am interested in what improvements you are looking for.

Tony

Mohammad

unread,
Dec 27, 2019, 12:49:42 AM12/27/19
to TiddlyWiki
Simple to use simple to understand and do less unnecessary jobs!

--Mohammad
Reply all
Reply to author
Forward
0 new messages