How to show date in message history?

Anyone know ways of having the date for each set of messages sent under that date appear within the chat? Like in examples below:


Screenshot 2024-07-02 143132
Screenshot 2024-07-02 143100

I have come across a simple approach involving the use of nesting of repeating groups.

Your message data table should have another field called date (let’s call it DATE for now), where you store the creation date (but set the hours, minutes, seconds to 0)

Now, the outer repeating group is a list of these DATEs

The inner repeating group consists of a list of messages where the message DATE is same as the outer repeating group cell’s DATE, ordered by creation date.

So you outer repeating group would contain 2 elements

  1. The date (as shown in the circle in your example)
  2. Inner repeating group of messages

Let me know if this approach makes sense :smile:

Probably doing a RG of type date and use group by
Another RG inside this RG to show message related to current cell date.

But… because it could cost a lot of WU, better to use an hidden RG with all the message, and use this RG data to create the RG date and message displayed

1 Like

@Jici @Zeroic
Thank y’all,

But what would the condition be to only show the date in that repeating group that corresponds to the earliest message of that date?

@Jici @Zeroic @eric10 @adamhholmes

Going off what was said in this forum post and this one:
https://forum.bubble.io/t/group-records-by-date/191624

I’m close… but unable to sort the repeating group of messages properly by the corresponding 24 hours. The repeating groups cells are showing the whole conversation history instead of messages by the date. (see screenshots)



Doing a = on the constraint doesn’t work, nothing shows up…

Doing <> works, or anything other than = works


Screenshot 2024-07-04 025018

Sent receive timestamp >= Parent group grouping date
Add another
Sent receive timestamp < parent group grouping date:+1 day

@Jici
Thank you!! that works.

1 Like