Thanks Jeremy,

I saw that, but it was my understanding that it only operated on tiddler
titles. I need it to operate on a custom field.

Cheers,

Damon


On Sun, Nov 29, 2020 at 12:16 PM Jeremy Ruston <[email protected]>
wrote:

> Hi Damon
>
> We now have a compare operator in the core that can do "less than"
> comparisons on numbers, dates and strings:
>
> https://tiddlywiki.com/#compare%20Operator
>
> Best wishes
>
> Jeremy
>
> --
> Jeremy Ruston
> [email protected]
> https://jermolene.com
>
> On 29 Nov 2020, at 19:14, History Buff <[email protected]> wrote:
>
> Joshua,
>
> I stumbled on this thread today while searching for "less than" in this
> group. Your compare fields filter is exactly what I was looking for! Thanks
> so much. It works amazingly.
>
> Damon
>
> On Wednesday, September 30, 2020 at 4:03:09 PM UTC-7 [email protected]
> wrote:
>
>> The core "compare[X]" operator only compare each "input title" to the
>> operand (i.e. X). It has options to compare strings, numbers, equal to,
>> greater than, etc.... BUT the limitation of only comparing input-title
>> means you would have to use "get[]" or similar to retrieve the data, thus
>> losing the "title" during the filter-processing.
>>
>> I don't think "subfilter[]" will help here, because the compare[] op, as
>> I said, returns the data that passes the compare-function given, NOT the
>> title.
>>
>> So I rolled my own. It is included in the JSONMangler plugin, but can be
>> pulled into any wiki if you go to the plugin-contents tab, and drag the
>> filter you want to your own wiki:
>>
>>
>> http://chronicles.wiki/TW5-JsonMangler/#%24%3A%2Fplugins%2Fjoshuafontany%2Fjsonmangler
>>
>> You will want to drag and drop the
>>
>>    - $:/plugins/joshuafontany/jsonmangler/modules/filters/comparefield.js
>>
>>  link in the contents tab.
>>
>> Best,
>>
>> Joshua Fontany
>>
>> On Wednesday, September 30, 2020 at 1:34:39 PM UTC-7 [email protected]
>> wrote:
>>
>>> I'm looking for a way to get tiddlers based on comparing integer fields
>>> existing in them. This filter works:
>>>
>>> [myfieldOne[2]myfieldTwo[2]]
>>>
>>> I'd like something like:
>>>
>>> [myfieldOne[lteq[2]]myfieldTwo[lteq[2]]]
>>>
>>> I know there are compare operators (
>>> https://tiddlywiki.com/#compare%20Operator), but I haven't figured out
>>> how to use it to filter the lists. Would this require a subfilter? If so,
>>> how would that look?
>>>
>>> Thanks!
>>> Sean
>>>
>>
>>>
>>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/5820178b-d886-4c70-9c05-b44a4f9d0868n%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/5820178b-d886-4c70-9c05-b44a4f9d0868n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/EfRToFFXCh0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/E9085145-120E-4319-BE14-189DCA73F711%40gmail.com
> <https://groups.google.com/d/msgid/tiddlywiki/E9085145-120E-4319-BE14-189DCA73F711%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAD1WRcYm5fetta9%3DPX%2BG2Bar4-h2rnmacA1%3DhJqqU397GhtQ7w%40mail.gmail.com.

Reply via email to