Next/Prev Action Buttons?

I want to build a swipe style component for my app. I need to have a next & previous action button to go through the items randomly in the table. I have it working using 1 max pages but would prefer the button UI.


Wouldn’t you want it to follow a sequence? If you do it randomly, do you want the left button to go back to your previous view? It can be tricky.

Yea I guess with the random order it could be hard to go back to the previous. Even if I can get it working in order would be a step in the right direction.

Here’s a video from @grumo .

I managed to get it working like this. But now stuck on adding a new row and continuing the row number sequentially

  • Add a rowID column to your table.
  • Add a lookup pointing to that rowID column so you get an array of rowIDs.
  • Add a find element index column, find the current row’s rowID amongst the array. It would give you a 0-based list of index that you can use to calculate your previous and next.

Only caveat here is if you need the first item’s previous to be the last one, then it would involve a rollup to get the max number of items, then some math/if-then-else columns (or a JS column).

1 Like

Yea , its a tricky one just for a simple function. I’ll give this a try and see can I figure something out