[TW5] list of tiddlers that have current weekday in custom field

28 views
Skip to first unread message

Bastian

unread,
Nov 9, 2021, 9:03:13 AM11/9/21
to TiddlyWiki
Hi all,

so I use TiddlyWiki to organize my daily work routines and I have some tiddlers for regular appointments that I attend with important information concerning the meeting and gathering all Journals for that meeting.
As these meetings always take place on the same day of the week I thought it would be possible to have them display in my sidebar on the respective day.

Example:
Tiddler with meeting information for the weekly Tuesday meeting.
Tiddler has custom field "routine" with value "Tuesday".

Todo:
Filter for all tiddlers with field "routine", where field value contains $currentWeekday

I played around a little bit with the filters but I'm coming to an end on where to match the weekdays.
I thought of creating a tiddler that dynamically contains only the weekday but I have no idea on how to match that.

Can someone point me in the right direction?

Best
Bastian

Bastian

unread,
Nov 9, 2021, 9:30:20 AM11/9/21
to TiddlyWiki
Ah, totally forgot to post the code I got so far:
So first I made a variable for the weekday:

<$set name=weekday value=<<now DDD>>>
<<weekday>>
</$set>

and then I filter for all tiddlers that contain the weekday of the variable in the field "routine":

<<list-links filter:"[contains:routine<<weekday>>]">>

But this doesn't seem to be the right way because it totally breaks the display:

<[contains:routine>
  • Routine
</$list> </[contains:routine<]">>

Bastian

unread,
Nov 9, 2021, 9:40:02 AM11/9/21
to TiddlyWiki
After looking at my posted code I immediately saw the problem — it's solved!
Here is the correct code to do it in case someone else has the same approach:

<$set name=weekday value=<<now DDD>>>
<<list-links filter:"[contains:routine<weekday>]">>
</$set>

Reply all
Reply to author
Forward
0 new messages