[tw5] Re: Trouble with nested lists, variables, prefix operator

2021-04-19 Thread TW Tones
You can also wrap the list with a Wikify, although I like Marks solution 
better.

See how I reuse the variable name;

<$wikify name=combo text="<>">
*<> | <$list 
filter="[tag[Journal]prefix]">{{!!title}}*



PS in your Question you refer to YYY not  but I doubt its important 
here.

Regards
Tones
On Tuesday, 20 April 2021 at 07:14:30 UTC+10 Mark S. wrote:

> The combo variable isn't being rendered and then passed to the list filter 
> as you might imagine. It's being rendered right there in place, and the 
> filter is getting the literal text.
>
> Try getting rid of the <$set> widget and replacing the text in the middle 
> with:
>
> <$vars combo={{{ []addsuffix[-]addsuffix] }}} >
> <> | <$list filter="[tag[Journal]prefix]">{{!!title}}
> 
>
> I'm not sure if the nested bit with the <$tiddler tiddler=year> widget is 
> necessary.
> On Monday, April 19, 2021 at 1:52:48 PM UTC-7 Brian Radspinner wrote:
>
>>
>> Hello all,
>>
>> I am trying to get a nested timeline of Journal entries. Each Journal 
>> tiddler title starts with the prefix "YYY-0MM-0DD/" (example: 
>> *2021-04-19/Walking*). For each day, there is also an empty tiddler 
>> titled with the format "YYY-0MM-0DD" (example: *2021-04-19*). These 
>> "day" tiddlers also have a "year" and "month" field (example: year=2021, 
>> month=-4).
>>
>> I am trying to get a nested timeline list using the fields to break out 
>> the year & months, then finally display a list of transcluded entries for 
>> each year-month combo. So far I have the below code:
>> 
>> \define combo() $(getCombo)$
>>
>> <$set name="getCombo" value="""<>-<>""" >
>>
>> <$list 
>> filter="[tag[Journal]has:field[year]each[year]get[year]!nsort[title]]" 
>> variable="year">
>><$tiddler tiddler=<>>
>>   <>
>>   <$list 
>> filter="[prefixhas:field[month]each[month]get[month]!nsort[title]]" 
>> variable="month">
>>  <$tiddler tiddler=<>>
>>{{!!title}}
>><> | <$list 
>> filter="[tag[Journal]prefix]">{{!!title}}
>>  
>>   
>>
>> 
>>
>> 
>>  
>>
>> Everything works great until the line *<> | <$list 
>> filter="[tag[Journal]prefix]">{{!!title}}*. Outside the 
>> list, the <> variable properly displays, but inside the list  
>> is (maybe) not working. I am getting an empty list instead a list of 
>> tiddler titles prefixed with the <>-<> variables.
>>
>> Any suggestions?
>>
>> Thanks
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1ffe8b4e-516c-40d8-81b3-ff95d86ab89fn%40googlegroups.com.


[tw5] Re: Trouble with nested lists, variables, prefix operator

2021-04-19 Thread Brian Radspinner
Perfect! That worked. Thank you very much Mark.

On Monday, April 19, 2021 at 2:14:30 PM UTC-7 Mark S. wrote:

> The combo variable isn't being rendered and then passed to the list filter 
> as you might imagine. It's being rendered right there in place, and the 
> filter is getting the literal text.
>
> Try getting rid of the <$set> widget and replacing the text in the middle 
> with:
>
> <$vars combo={{{ []addsuffix[-]addsuffix] }}} >
> <> | <$list filter="[tag[Journal]prefix]">{{!!title}}
> 
>
> I'm not sure if the nested bit with the <$tiddler tiddler=year> widget is 
> necessary.
> On Monday, April 19, 2021 at 1:52:48 PM UTC-7 Brian Radspinner wrote:
>
>>
>> Hello all,
>>
>> I am trying to get a nested timeline of Journal entries. Each Journal 
>> tiddler title starts with the prefix "YYY-0MM-0DD/" (example: 
>> *2021-04-19/Walking*). For each day, there is also an empty tiddler 
>> titled with the format "YYY-0MM-0DD" (example: *2021-04-19*). These 
>> "day" tiddlers also have a "year" and "month" field (example: year=2021, 
>> month=-4).
>>
>> I am trying to get a nested timeline list using the fields to break out 
>> the year & months, then finally display a list of transcluded entries for 
>> each year-month combo. So far I have the below code:
>> 
>> \define combo() $(getCombo)$
>>
>> <$set name="getCombo" value="""<>-<>""" >
>>
>> <$list 
>> filter="[tag[Journal]has:field[year]each[year]get[year]!nsort[title]]" 
>> variable="year">
>><$tiddler tiddler=<>>
>>   <>
>>   <$list 
>> filter="[prefixhas:field[month]each[month]get[month]!nsort[title]]" 
>> variable="month">
>>  <$tiddler tiddler=<>>
>>{{!!title}}
>><> | <$list 
>> filter="[tag[Journal]prefix]">{{!!title}}
>>  
>>   
>>
>> 
>>
>> 
>>  
>>
>> Everything works great until the line *<> | <$list 
>> filter="[tag[Journal]prefix]">{{!!title}}*. Outside the 
>> list, the <> variable properly displays, but inside the list  
>> is (maybe) not working. I am getting an empty list instead a list of 
>> tiddler titles prefixed with the <>-<> variables.
>>
>> Any suggestions?
>>
>> Thanks
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f8562f65-8d5b-4ef5-a51b-62bcadf079d2n%40googlegroups.com.


[tw5] Re: Trouble with nested lists, variables, prefix operator

2021-04-19 Thread 'Mark S.' via TiddlyWiki
The combo variable isn't being rendered and then passed to the list filter 
as you might imagine. It's being rendered right there in place, and the 
filter is getting the literal text.

Try getting rid of the <$set> widget and replacing the text in the middle 
with:

<$vars combo={{{ []addsuffix[-]addsuffix] }}} >
<> | <$list filter="[tag[Journal]prefix]">{{!!title}}


I'm not sure if the nested bit with the <$tiddler tiddler=year> widget is 
necessary.
On Monday, April 19, 2021 at 1:52:48 PM UTC-7 Brian Radspinner wrote:

>
> Hello all,
>
> I am trying to get a nested timeline of Journal entries. Each Journal 
> tiddler title starts with the prefix "YYY-0MM-0DD/" (example: 
> *2021-04-19/Walking*). For each day, there is also an empty tiddler 
> titled with the format "YYY-0MM-0DD" (example: *2021-04-19*). These 
> "day" tiddlers also have a "year" and "month" field (example: year=2021, 
> month=-4).
>
> I am trying to get a nested timeline list using the fields to break out 
> the year & months, then finally display a list of transcluded entries for 
> each year-month combo. So far I have the below code:
> 
> \define combo() $(getCombo)$
>
> <$set name="getCombo" value="""<>-<>""" >
>
> <$list 
> filter="[tag[Journal]has:field[year]each[year]get[year]!nsort[title]]" 
> variable="year">
><$tiddler tiddler=<>>
>   <>
>   <$list 
> filter="[prefixhas:field[month]each[month]get[month]!nsort[title]]" 
> variable="month">
>  <$tiddler tiddler=<>>
>{{!!title}}
><> | <$list 
> filter="[tag[Journal]prefix]">{{!!title}}
>  
>   
>
> 
>
> 
>  
>
> Everything works great until the line *<> | <$list 
> filter="[tag[Journal]prefix]">{{!!title}}*. Outside the 
> list, the <> variable properly displays, but inside the list  
> is (maybe) not working. I am getting an empty list instead a list of 
> tiddler titles prefixed with the <>-<> variables.
>
> Any suggestions?
>
> Thanks
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6f29f977-635f-499a-868d-918aaf710caen%40googlegroups.com.