Filter by field

How should I write a filter to return a list of tiddlers with a certain tag, ordered by a field value they all have, having values of 1 to the number of tiddlers?

Something like this?:

[tag[shopping]nsort[price]]

You can see this by downloading this and dragging it to tiddlywiki.com:

ShoppingList.json (193 Bytes)

If you want to sort in the reverse order, you can add a “!” before nsort:

[tag[shopping]!nsort[price]]

Note that nsort is used here instead of sort because it works properly with numeric data. If you have mixed data, you might try sortan.

Thanks for your reply & I can see that it works. I have transcribed and old written notebook one page per tiddler, I did the transcription in a random order, when I filter by the tag ‘w1’ I get all the pages in the order they were transcribed. I want them in page order so I tried having a ‘page’ field in all the tiddlers and listing by the page number in that field. Can that be done and is there a better way altogether?

I have found that this simple filter does the job [tag[w2]has[page]nsort[page]].I spent hours trying to sort by page n which appears in all the titles at different places using regex, split etc but with no success. obviously I am just starting to learn tiddlywiki.
Thanks for your time

Great. And if f you want to find all the w2 pages that have not yet received a page field, you should be able to use this in Advanced Search > Filter: [tag[w2]!has[page]]