# Next/Previous record/details screen buttons

**URL:** https://community.glideapps.com/t/next-previous-record-details-screen-buttons/68411
**Category:** Ask for Help
**Created:** [December 6, 2023, 8:24am UTC](https://community.glideapps.com/t/next-previous-record-details-screen-buttons/68411 "2023-12-06T08:24:10Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [December 8, 2023, 1:42pm UTC](https://community.glideapps.com/t/next-previous-record-details-screen-buttons/68411/9 "2023-12-08T13:42:25Z")

</div>

Start by building the columns for the 2nd use case in the following post.

> [@How do I create an auto-incrementing row number with Glide Tables?](https://community.glideapps.com/t/how-do-i-create-an-auto-incrementing-row-number-with-glide-tables/39572):
>
> This is a question that comes up a lot, so creating this topic to use as a reference. Typically, there are two distinct use cases when it comes to auto-incrementing row numbers. Use Case 1: – We need to generate a Part Number, or an Order Number, or an Employee ID. Once the number is generated, it should never change, even if rows are deleted. – The general approach for this use case is to maintain a static counter, use it to craft a suitably formatted ID, and increment it by one every time…

Once you have that, create 2 math columns. One to subtract 1 from the index, and one to add 1 to the index.

Next, create 2 single relation columns. One that links the first math column to the index column, and a second relation that links the other math column to the Index.

Now you should have two relations that each point to the row above and below the current row. Now on your detail screen add two buttons. Both with a Show Detail Screen action, but each one using the appropriate relation as it’s source.

That should be it. You should be able to use buttons to navigate between items.

**Edit** : I just quickly scanned through Grumo’s video that @Hassan_Nadeem shared and it is doing the exact same thing that I suggested, except that I eliminated one extra step. I’m not sure I understand why you feel his method wouldn’t have worked for you because I feel it should work quite well and dynamically.

---

_[View the full topic](https://community.glideapps.com/t/next-previous-record-details-screen-buttons/68411)._
