# Reversing Repeating Group cells for Chat apps

**URL:** <https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839>\
**Category:** Need help\
**Created:** [January 6, 2024, 8:24pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839 "2024-01-06T20:24:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrase9](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/phrase9/32/187478_2.png) [@phrase9](https://forum.bubble.io/u/phrase9)\
**Post date:** [January 6, 2024, 8:24pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/1 "2024-01-06T20:24:49Z")

</div>

Hello all

I have been away from Bubble for a bit and am recently catching up. Since the new responsive engine was employed, is there a basic method to reverse repeating group cell orders so that they mimic modern day chat apps or is the [manual method described here](http://forum.bubble.io/t/how-to-reverse-a-repeating-group-for-chat-scenarios-and-more/210859) or the [plugin method described here](http://forum.bubble.io/t/reverse-repeating-groups-for-chats-new-plugin-from-zeroqode/63773) still the only ways to go about it?

---

<div class="post-metadata">

**Author:** ![YourFavFreelancer](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/yourfavfreelancer/32/254027_2.png) [@YourFavFreelancer](https://forum.bubble.io/u/YourFavFreelancer)\
**Post date:** [January 6, 2024, 8:45pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/2 "2024-01-06T20:45:20Z")

</div>

Yes, and I have found the Reverse RG by @Thimo more reliable.

---

<div class="post-metadata">

**Author:** ![phrase9](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/phrase9/32/187478_2.png) [@phrase9](https://forum.bubble.io/u/phrase9)\
**Post date:** [January 6, 2024, 9:23pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/3 "2024-01-06T21:23:27Z")

</div>

Thanks for the tip ill have a look at it

---

<div class="post-metadata">

**Author:** ![phrase9](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/phrase9/32/187478_2.png) [@phrase9](https://forum.bubble.io/u/phrase9)\
**Post date:** [January 6, 2024, 9:35pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/4 "2024-01-06T21:35:46Z")

</div>

I am actually confused now. I realize that the way bubble naturally displays repeating groups is how chat apps like whatsapp, telegram and facebook display their chats too which is the newest message showing at the bottom. These plugins reverse it to the top which is not what is standard among the chat apps mentioned. So the only issue I am left with is the scroll bar doesn’t automatically go down once a new message is sent and the user needs to manually scroll down to see the latest message. Is there a remedy to that?

---

<div class="post-metadata">

**Author:** ![nico.dicagno](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nico.dicagno/32/207961_2.png) [@nico.dicagno](https://forum.bubble.io/u/nico.dicagno)\
**Post date:** [January 6, 2024, 10:16pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/5 "2024-01-06T22:16:15Z")

</div>

As you said, dont reverse the RG. There is a native ‘scroll to entry of a repeating group” action.  
In the dynamic expression, reference the RG’ list of items:last item.  
This will automatically scroll to the last item of the RG

---

<div class="post-metadata">

**Author:** ![phrase9](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/phrase9/32/187478_2.png) [@phrase9](https://forum.bubble.io/u/phrase9)\
**Post date:** [January 6, 2024, 11:08pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/6 "2024-01-06T23:08:49Z")

</div>

You saved my life for the second time today

![](https://media.tenor.com/t9AHo_OHbe4AAAAM/de-niro-very-good.gif)

---

<div class="post-metadata">

**Author:** ![nico.dicagno](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nico.dicagno/32/207961_2.png) [@nico.dicagno](https://forum.bubble.io/u/nico.dicagno)\
**Post date:** [January 6, 2024, 11:15pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/7 "2024-01-06T23:15:24Z")

</div>

Absolute pleasure 🙂 keep them coming

---

<div class="post-metadata">

**Author:** ![2706mason](https://avatars.discourse-cdn.com/v4/letter/2/7993a0/32.png) [@2706mason](https://forum.bubble.io/u/2706mason)\
**Post date:** [January 8, 2024, 12:30pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/8 "2024-01-08T12:30:56Z")

</div>

Won’t this load all messages in a chat and result in a bigger WU hit for long discussions?

---

<div class="post-metadata">

**Author:** ![nico.dicagno](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nico.dicagno/32/207961_2.png) [@nico.dicagno](https://forum.bubble.io/u/nico.dicagno)\
**Post date:** [January 8, 2024, 2:38pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/9 "2024-01-08T14:38:24Z")

</div>

Yes you’re absolutely right, sorry for not mentioning it.  
WU consumption would go through the roof with this method.

You would have to find a way to download to the page only the last few messages from a chat instead of downloading the entire discussion.

There are multiple ways to do this but here is a basic implementation:

Before we start, don’t use lists. Lists are downloaded to the page in their entirety if any of their entries are referenced. Might be tempting to create a Discussion datathing, a message datathing, and add a list of messages field to the Discussion. DONT do this 🙂

Instead of that, you could create a discussion datathing with fields for User 1 User 2 & #of messages in the discussion.  
The messages datathing would have a Content + Index data.  
When the user opens a discussion, populate your repeating group with ‘Do a search for Messages: [Constraint: Index \> Selected discussion’s # of messages - X]’  
You can choose what the starting value of X is, however you should have a button at the top of your RG which allows the user to load previous messages. This would increase the value of X, so more messages would be loaded. You could also implement a workflow which automatically does this based on user scrolling.

There are other ways of doing this, however this can get you headed in the right direction and save you lots of WU.

Also, while ‘do a search for: items from #’ might look like a good solution, it does not save WU, as the ‘:items from #’ operator is applied after the whole search is returned, so the datathings are downloaded to the page anyways.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [March 16, 2024, 8:25pm UTC](https://forum.bubble.io/t/reversing-repeating-group-cells-for-chat-apps/300839/10 "2024-03-16T20:25:03Z")

</div>

Closed on March 16, 2024, 8:25pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
