<$list filter="[has[frequency]]"> I have 10 recurring tasks
<$list filter="[all[current]!days:last-contact{!!frequency}]"> 7 tasks
haven't been completed in {{!!frequency}} days. last-contact contains the
timestamp of latest completion.
<$link><$view field="title"/></$link>
</$list>
</$list>
As expected the output is 7 tiddler titles:
Task1
Task2
Task4
Task5
Task8
Task9
Task10
After this list I want:
You have *[7]* tasks.
___________________
<$vars theCount={{{ [all[current]!days:last-contact{!!frequency}count[]]
}}} > does not seem to work.
"[all[current]..." contains only one title at a time which then either
passes the !days filter or not. Thus after count[], <<theCount>> variable
will contain a 1 or a 0.
I'm afraid there is no solution at my level of competence :/
maanantai 13. syyskuuta 2021 klo 18.36.56 UTC+3 [email protected] kirjoitti:
> This may seem silly, but a mock-up screenshot of expected output would be
> pretty awesome. Information with labels of what the information means.
>
> My last sample I posted should have had the question "something like
> this?", because it definitely wasn't any kind of "this is the answer you're
> looking for.'
>
>
>
> On Monday, September 13, 2021 at 12:20:15 PM UTC-3 Charlie Veniot wrote:
>
>> Well, in the middle of doing something else, so not quite sure if I have
>> the right count in the highlighted filter.
>>
>> On Monday, September 13, 2021 at 12:18:45 PM UTC-3 Charlie Veniot wrote:
>>
>>> <$list filter="[has[frequency]]">
>>> *<$vars theCount={{{
>>> [all[current]!days:last-contact{!!frequency}count[]] }}} >*
>>>
>>> <$list filter="[all[current]!days:last-contact{!!frequency}]">
>>> <$link><$view field="title"/></$link>
>>> </$list>
>>> *</$vars>*
>>> </$list>
>>>
>>> On Monday, September 13, 2021 at 12:12:45 PM UTC-3 0 0 wrote:
>>>
>>>> Thank you for your answer, I appreciate your help.
>>>> However, your suggestion does not seem to affect the underlying
>>>> problem: I'm unable to get the number of tiddlers that pass the filter of
>>>> second list.
>>>> I'll try to elaborate what I meant in my original post.
>>>>
>>>> For example let's say the outer list alone would output 100 tiddlers.
>>>> If I added count[] to this filter to get the number of tiddlers this outer
>>>> list outputs I will see the number 100 instead of 100 individual titles.
>>>> Then the inner list filters out 30 tiddlers that do not satisfy the
>>>> additional condition. I see 70 tiddler titles that pass the outer AND
>>>> inner
>>>> filter, but I'm unable to count them (except by hand).
>>>> Adding count[] to the inner list would just yield a mix of 30 zeroes (0
>>>> 0 0 0...for each time the currently evaluated tiddler does not pass the
>>>> inner filter) and 70 ones (1 1 1 1...whenever it does).
>>>>
>>>> Now either I'd need some way to have a variable that would increase
>>>> each time a tiddler passes the inner filter, or I'd need to have it all in
>>>> a single-level list (which with current setup doesn't work exactly for the
>>>> reason Eric describes). Or there could be a completely different approach
>>>> that I'm unable to see.
>>>>
>>>> 0
>>>> maanantai 13. syyskuuta 2021 klo 18.02.58 UTC+3 Eric Shulman kirjoitti:
>>>>
>>>>> On Monday, September 13, 2021 at 6:51:14 AM UTC-7 [email protected]
>>>>> wrote:
>>>>>
>>>>>> Aside: we could merge the two <$list> filters together
>>>>>
>>>>>
>>>>> That wouldn't work in this case, as the inner filter uses
>>>>> `{!!frequency}`, which depends upon the outer filter to set the
>>>>> `currentTiddler` value to each tiddler that `has[frequency]`
>>>>> If the two filters were merged, then `{!!frequency}` would refer to
>>>>> the tiddler that contains the `$list` widget, rather than each tiddler
>>>>> that
>>>>> `has[frequency]`
>>>>>
>>>>> -e
>>>>>
>>>>
--
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/a9444a68-9979-468f-9a68-336830edd27en%40googlegroups.com.