# Can I auto-scroll to a new RG row at the bottom?

**URL:** <https://forum.bubble.io/t/can-i-auto-scroll-to-a-new-rg-row-at-the-bottom/211552>\
**Category:** Questions\
**Created:** [June 16, 2022, 1:39pm UTC](https://forum.bubble.io/t/can-i-auto-scroll-to-a-new-rg-row-at-the-bottom/211552 "2022-06-16T13:39:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![firstfifteensoftware](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/firstfifteensoftware/32/152406_2.png) [@firstfifteensoftware](https://forum.bubble.io/u/firstfifteensoftware)\
**Post date:** [June 16, 2022, 1:39pm UTC](https://forum.bubble.io/t/can-i-auto-scroll-to-a-new-rg-row-at-the-bottom/211552/1 "2022-06-16T13:39:47Z")

</div>

I have a small messaging system in my app.

When User A adds a new message, User B automatically gets the new message at the bottom of his RG list.

All this works perfectly.

BUT…is there a way that I can get User A’s RG to automatically scroll down to the new message he just got from User B? I’d like it to work a lot like your message app on your phone.

I got it to scroll to the bottom when User A first looks at his messages. I just need it to “refresh” itself and scroll down to the NEW message when a new one comes in.

---

<div class="post-metadata">

**Author:** ![Clasicwebtools](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/clasicwebtools/32/146201_2.png) [@Clasicwebtools](https://forum.bubble.io/u/Clasicwebtools)\
**Post date:** [June 30, 2022, 4:22am UTC](https://forum.bubble.io/t/can-i-auto-scroll-to-a-new-rg-row-at-the-bottom/211552/2 "2022-06-30T04:22:25Z")

</div>

hey @firstfifteensoftware no way to auto scroll. What you could work around is to have a state to change from sort ascending to descending when a message is recieve.

In the workflow you have run when new message is recieve and the action would be set state.

---

<div class="post-metadata">

**Author:** ![ihsanzainal84](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ihsanzainal84/32/245932_2.png) [@ihsanzainal84](https://forum.bubble.io/u/ihsanzainal84)\
**Post date:** [June 30, 2022, 7:51am UTC](https://forum.bubble.io/t/can-i-auto-scroll-to-a-new-rg-row-at-the-bottom/211552/3 "2022-06-30T07:51:05Z")

</div>

There’s a scroll to RG index as an action in workflows. Easy way to do it is to have a state that stores a “last count” of loaded messages.

Then have a Do When Condition workflow that scrolls to the RG index of last message whenever that “last count” state and the RG :count don’t match. Make sure to update the “last count” state so it will trigger the workflow again for the next new message.

---

<div class="post-metadata">

**Author:** ![darren.james7518](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@darren.james7518](https://forum.bubble.io/u/darren.james7518)\
**Post date:** [June 30, 2022, 8:38am UTC](https://forum.bubble.io/t/can-i-auto-scroll-to-a-new-rg-row-at-the-bottom/211552/4 "2022-06-30T08:38:05Z")

</div>

Yeah I think [ihsanzainal84](http://forum.bubble.io/u/ihsanzainal84) answer makes sense, ‘scroll to’ the bottom of the RG. It’s a good question though.

---

<div class="post-metadata">

**Author:** ![firstfifteensoftware](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/firstfifteensoftware/32/152406_2.png) [@firstfifteensoftware](https://forum.bubble.io/u/firstfifteensoftware)\
**Post date:** [July 11, 2022, 1:02pm UTC](https://forum.bubble.io/t/can-i-auto-scroll-to-a-new-rg-row-at-the-bottom/211552/5 "2022-07-11T13:02:12Z")

</div>

AWESOME! Thank you SO MUCH!

---

<div class="post-metadata">

**Author:** ![LotoMaker64](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@LotoMaker64](https://forum.bubble.io/u/LotoMaker64)\
**Post date:** [March 3, 2024, 11:04am UTC](https://forum.bubble.io/t/can-i-auto-scroll-to-a-new-rg-row-at-the-bottom/211552/6 "2024-03-03T11:04:47Z")

</div>

Hello,

Could we see how it looks please ? Bit complex to understand 🙂

Many thanks,

Armand
