I am looking to create a messaging system for my users to communicate with a group of up to 3 other people.
I have the chats organized in a repeating group and each element has an “open chat” button. I would like to set it up so when you click the “open chat” button, it will display a pop-up window with all the messages inside.
Ok, you need to restructure how you’re saving the messages a little. I’m going to assume that a chat is like a topic that contains a list of messages related to the topic.
So for each chat, you’d need a list of messages. The messages field should be a list that is type text. When the Send button is clicked, the action should actually be “Make a change to parent group (that is, the popup)'s chat” > field to change is Messages: add MultiLineInput’s value. So you’re adding a new text to the message list within the chat that this popup is displaying.
Currently, the way you have it set up is whenever Send is clicked, you’re creating an entire new chat, which is incorrect. You just want to create a new message within the chat.
Also, in order to display the message list, your repeating group (in the popup) data source should be Parent Group (the popup)'s messages (the text list field). That’s it. Each cell will then be each text in that list.
I have run into another issue, when I send a message in the chat then close out of the popup, the repeating group element that I clicked “open chat” in disappears. Any idea why this is happening?
Hm interesting. Check your workflows? Do you have a hide element action in there by accident off the pop-up close workflow? Or is there some kind of visibility condition on the repeating group?
I’m attempting something similar to Alec. But I have several questions. I am already saving calendar events under data type ‘Log’. Should I create a new data type for the RG things? And, would the RG accept data from different types? I have created a ‘username’ field to display in the RG but it is a User type and the other data to display in the RG is of ‘Log’ type. Thanks.