<!-- 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>
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