# Sort repeating group by other type

**URL:** <https://forum.bubble.io/t/sort-repeating-group-by-other-type/195986>\
**Category:** Need help\
**Created:** [March 14, 2022, 10:49am UTC](https://forum.bubble.io/t/sort-repeating-group-by-other-type/195986 "2022-03-14T10:49:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marco.mueller](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@marco.mueller](https://forum.bubble.io/u/marco.mueller)\
**Post date:** [March 14, 2022, 10:49am UTC](https://forum.bubble.io/t/sort-repeating-group-by-other-type/195986/1 "2022-03-14T10:49:21Z")

</div>

Hi there,

I have two types in my data types: User and Messages.

In the User Table, every User has a List-Field (field type: list of users), where I store the unique IDs of all ‘MatchedUsers’.

In a different data type, called ‘Messages’, I store all messages with the fields messageReceiver, messageSender, messageContent, Created Date…

Now I would like to show all MatchedUsers for the CurrentUser(works), sorted by the creation date of the last message. Just like in all common chat apps.

How can I sort the list of users based the creation date of the other data type?

Thank you for your hints  
Cheers Marco

---

<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:** [May 23, 2022, 10:50am UTC](https://forum.bubble.io/t/sort-repeating-group-by-other-type/195986/2 "2022-05-23T10:50:19Z")

</div>

Closed on May 23, 2022, 10:50am UTC

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