Forum Academy Marketplace Showcase Pricing Features

Need help with setting up a repeating group

i want a messaging function so like in a phone’s sms app, there is a messaging convo between two users, but an overall repeating group that can display all the convos with only the most recent message visible, so that a user can click on the text and open up the convo between him/herself and the other user. i have only managed to set up a repeating group that shows every message the user has received from all users and from a certain user, but i want a repeating group in which a cell only shows the latest message from a certain user, to signify a message convo/thread.

so i have the message convo part, now i just need to figure out how to represent all the convo/threads into a repeating group that displays all of the convos thread.

i have a thing called messages which is simply created once a user sends another user a text from an input. should i have a thing called message thread? so when a message is sent, a new message thread is created? but wouldnt that mean multiple message threads/convos would be created between two users, when there should only be one(like in sms)?

For a conversation you need two objects - call them

- messages: List of messages
- participants: List of users
- lastUpdated: Date

- text: text

Something like that should work for what you’re trying to accomplish. When a new message is created, append it to the list of messages on the conversation object.

There are other ways to go about this, but that should work.

how would i set up a repeating group for the message inbox so that a user can press on a cell and open up the thread?

how do i make sure that when no prior convo existed, that a new convo/message thread is created, but for future messages, the messages are added to that message thread, rather than creating a new convo?

because right now, it keeps creating new message threads for each message

i figure i need to use the “only when” function but i am not sure what to do specifically.

I’d have to see your app to see what you’re doing exactly. If you share a link I’ll take a look.

It should be something like the following:

Step 1: Create a new message

Step2: “Make changes to thing”, make the conversation the data source, and check the box to create if the convo doesn’t exist. Then append the message to the convo’s list of messages.

1 Like

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