Here's a javascript filter  "equals" (based on 'field') to try. Since it 
compares based on text, not fields, operations like equals:myfield are 
meaningless. I left code in there that can process regular expressions, but 
didn't test if it still works since that approach to regular expressions 
has been deprecated.

After installing, these tests seemed to work as expected depending on what 
variables were set:

<$vars foo="stuff" bar="stuff">
<$list filter="[<foo>equals<bar>]">
THEY MATCH!
</$list>

<$list filter="[<foo>!equals<bar>]">
THEY DON'T MATCH!
</$list>
</$vars>



Have fun,
Mark

On Sunday, August 27, 2017 at 12:45:22 PM UTC-7, Mat wrote:
>
> I often want to test if e.g a field or variable has a certain value. How 
> do I best do this in a filter?
>
> [{foo!!bar}EQUALS[frotz]]
>
> ...what is "EQUALS" ?
>
> <:-)
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/cb6f18f2-7f53-442a-a6bc-d1961ec553ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: $__core_modules_filters_equals.js.json
Description: application/json

Reply via email to