I’m doing a chat system, everything works fine, but my RG is not organizing the messages correctly.
I need the messages to be shown in order of sending.
However my RG is organizing messages from the current user first, and then the other user, without a sending order.
You need to apply a sort on the data for the repeating group to sort it by date modified. Then you need to adjust the Display Descending Option to yes or no depending on how you want to view the data.
Yes, it was a solution, but I do two searches on my RG, one for messages from the current user and one for messages from the other user (Search for Messages merged with).
So this solution will not work as it should.
If you have any tips on how I can change this way of searching for messages, I would be grateful.
You should make a conversation type, and a message type linked to the conversation. If you only need 1:1 conversations, you method works. If you ever need group chat, or if you want to remove the :merge and :sort operations from happening in real time, you can apply this data structure very easily. Here is a short video I made a while back discussing it: