how to make a filter with an OR operator?

62 views
Skip to first unread message

HC Haase

unread,
Jan 24, 2020, 4:10:16 AM1/24/20
to TiddlyWiki
I am trying to make a $list with a filter that returns either expressionA OR expressionB

is this possible?

Mohammad

unread,
Jan 24, 2020, 4:43:46 AM1/24/20
to tiddl...@googlegroups.com
Logical OR means

A.OR.B  then
 true if ONLY one is true, so both true returns true
 false if only and only both are false

so

<$list filter="[[A]] [[B]] +[limit[1]]">
...
</$list>


works!

  • if none are exist then nothing returned
  • if both exist one is returned
  • if only A or B exist then one is returned

See Jed Carty logical operation


--Mohammad

HC Haase

unread,
Jan 24, 2020, 5:38:02 AM1/24/20
to TiddlyWiki
Thank you Mohammad. just what I needed.

the +limit[1] adds the limit[1] to every filter before it right?

Mohammad

unread,
Jan 24, 2020, 5:44:59 AM1/24/20
to TiddlyWiki


On Friday, January 24, 2020 at 2:08:02 PM UTC+3:30, HC Haase wrote:
Thank you Mohammad. just what I needed.

the +limit[1] adds the limit[1] to every filter before it right?

Yes, means return only one of them! 
Reply all
Reply to author
Forward
0 new messages