You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
This release ads two new filter operators: "comparefield[]" and "compareindex[]" operators that function as "compare[]" on a specific field or index. The first prefix is now the field or index name. See the help documentation in the example wiki.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
Joshua, thanks for providing and caring for JsonMangler. Two stupid noob questions.
- couldn't "compareindex[]" be achieved with getindex[]compare[]? Or have I got something wrong?
- is something like
[[Test]compareindex:<myIndex>:number:eq[3]] legit? e.g. when I want to dynamically create the field name?
Thanks, Werner
Joshua Fontany
unread,
Sep 28, 2020, 8:39:44 PM9/28/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
Hi Werner,
Great questions!
couldn't "compareindex[]" be achieved with getindex[]compare[]? Or have I got something wrong?
You could use that syntax, but unfortunately the text returned would be the value of the getindex[/index] operator, NOT the tiddler title.
The new syntax allows "[[Test]compareindex:/value:number:eq[3]]" to return [[Test]] instead of "3".
is something like [[Test]compareindex:<myIndex>:number:eq[3]] legit? e.g. when I want to dynamically create the field name?
No, unfortunately, as it is part of the operator suffixes, you cannot use the normal variable/translcude braces.
In order to dynamically pass a field or index, set it as a variable (here transcluded from a tiddler's text field), then call the macro to build the final filter: