filter a list by user-added field

76 views
Skip to first unread message

David

unread,
Mar 27, 2020, 1:06:52 PM3/27/20
to TiddlyWiki
I have this code that lists some TODO items that are tiddlers.

And yes, this code is inside another list loop that iterates over contexts like "Home" "Work" etc.

<$list filter="[<thisContext>listed[locationcontext]tag[Task]!tag[Done]]" variable="item">
<$checkbox tiddler=<<item>> tag="Done"/> <<item>>
</$list>

But these are unsorted-ish.  I'd like them sorted by priority, which is a user field I put in each one... or at least the ones that are a higher priority.  I assume sorting by priority is not all that easy, so I know one workaround is to do multiple lists, and stack them on top of each other.  First the priority = 1 list, and then the number 2 items, and then all the rest.

So, two questions...

  1. how do I alter the above code to get a specific priority, like 1, for instance?
  2. how do I get the tiddlers with no priority field set?

Thanks guys!

TonyM

unread,
Mar 27, 2020, 4:36:53 PM3/27/20
to TiddlyWiki
David

I can give a more Extencive answer later but have you tried sort[priority] or +[sort[priority]] ?

if you have a set number of priorities you can use the range operator to list 1 to 5

I find with to do lists its nice sometimes to list them all in priority or a subset by ptiority and category e.g. personal. Just create another tiddler and a list.

Reards
Tony

David

unread,
Mar 29, 2020, 11:31:09 PM3/29/20
to TiddlyWiki
Yep.  sort[priority] got it.  nice feature!

David

unread,
Mar 30, 2020, 7:21:01 AM3/30/20
to TiddlyWiki
And Thank You!


On Friday, March 27, 2020 at 4:36:53 PM UTC-4, TonyM wrote:
Reply all
Reply to author
Forward
0 new messages