Reporting back here some progress/questions. Im trying to do something like
this:
<!-- for the n many cards, we return n-1 -->
<$formula-vars counter="count([tag[Flash Card]])-1">
<!-- iter goes from 0 to n-2 -->
<$list filter="[range<counter>butlast[]]" variable="iter">
<!-- arrays need to be accessed from 1 to n -->
Current Card: (= nth([tag[Flash Card]sort[created]], <<iter>> + 1) =)
<br/>
Link to Next: (= nth([tag[Flash Card]sort[created]], <<iter>> + 2) =)
</$list>
<!-- take last element with no forward link -->
<$list filter="[range<counter>last[]]" variable="iter">
Last One: (= nth([tag[Flash Card]sort[created]], <<iter>> + 1) =)
</$list>
</$formula-vars>
The above is the only way I could get this kind of linked list working.
Things I could *not* figure out and would like some help with
- How to make range go from 1 to the variable <counter> using its native
format: [range[1,<counter>]]. This did not work, so I had to do shifting.
- Place the filter in a field, and have the above code with the field
contents
- Actually place a button on the outside of the lists, and an
actionwidget on the inside to create the tm modal!
More importantly, I initally tried to only *perform *the filtering once,
and use its results, stored in a variable, but I couldnt quite figure it
out. I kept getting cound not auto-convert into an array with Evan's
plugin, and even the list widget was acting strangely with it.
If anyone has any suggestions to imrpove the above i would be greatful!
Diego
On Friday, February 2, 2018 at 6:36:13 PM UTC-6, Diego Mesa wrote:
>
> Awesome! Could you give me a shell of an example if you get a chance?
>
> Thanks!
>
> On Friday, February 2, 2018 at 4:59:27 PM UTC-6, coda coder wrote:
>>
>> Yes. I've done it using listops. But frankly, I ended up hardwiring the
>> whole thing -- I could understand and reason about the code better, AND,
>> most importantly, understand it six months (weeks? minutes?) later.
>>
>>
>> On Friday, February 2, 2018 at 4:35:43 PM UTC-6, Diego Mesa wrote:
>>>
>>> Hey all,
>>>
>>> I am working on something where I would take a list of tiddlers I've
>>> filtered for, and display each one as a modal popup with a button to the
>>> next one. Is this possible?
>>>
>>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/ebbeb041-7f6d-4ab1-b68d-d92be0a4735e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.