Hello Eric,
 Thank you for your solution! It is not straightforward and smart procedure 
but it works in my case!
In conclusion I understood you have added ia as a prefix to tiddler names 
and then sort them.

Thanks
Atro

On Saturday, November 30, 2019 at 7:51:38 AM UTC+3:30, Eric Shulman wrote:
>
> On Friday, November 29, 2019 at 4:42:41 PM UTC-8, Mark S. wrote:
>>
>> <$list filter="[prefix[dat]getindex[ia]sort[]]">
>>
>> </$list>
>>
>
> @Mark: your answer will only return the sorted index values themselves, 
> what @atro wants is the names of the tiddlers containing those index values
>
> There *is* a solution, but it's not as simple.  Here's a (tested) demo 
> that works:
> \define getitems()
> <$list filter="[tag[test]]">
>    {{{ [<currentTiddler>getindex[ia]divide[1000]fixed[3]removeprefix[0.]] 
> }}};<<currentTiddler>>
> </$list>
> \end
>
> \define showoutput() <<currentTiddler>>={{##ia}}<br>
>
> __BEFORE: test tiddlers:__<br>
> <$list filter="[tag[test]]">
>    <<showoutput>>
> </$list>
>
> __AFTER: test tiddlers, sorted by index "ia"__<br>
> <$wikify name="items" text=<<getitems>>>
>    <$list filter="[enlist<items>nsort[]]">
>       <$tiddler tiddler={{{ [<currentTiddler>split[;]last[]] }}}>
>          <<showoutput>>
>       </$tiddler>
>    </$list>
> </$wikify>
>
> 1) The getitems() macro builds a list of titles preceded by their 
> respective "ia" values (zero padded) with a semi-colon as a delimiter.
>
> 2) That list output is wikified, and used as input to another $list widget 
> that sorts it numerically
>
> 3) Then, a $tiddler widget is used to remove the "ia;" prefix, resulting 
> in the original tiddler title which is then used to show the output.
>
> enjoy,
> -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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/148d45ac-135d-49fe-bcd7-302b4c3aa4d6%40googlegroups.com.

Reply via email to