I am building a project app and I want users of a specific project to be able to communicate to each other within their project. The message-system is all set up, but it displays messages from all projects.
I added the new row in the messages table called project with type project, but I can’t seem to put up ‘current page project’ as a constraint.
So basically my problem now is: if user A sends a message in project A, it shows in all other projects she’s a part of as well. I know the solution is in connecting the message and project data, I just can’t seem to find a solution.
Have you gone through some tutorials? I didn’t go through through them, but Echo Lake and Mohammed Haashir (Kreator School) both have the foundation of messaging on youtube. @talbotnar is right it has something to do with your data setup. Faye Watson shared bits and pieces of a tutorial on this very forum. If you look around a bit you’ll find what you need
HOWEVER, if you did do all of the tutorials and spent the couple of hours you will need to figure it out, and you still can’t piece it together, drop us a line here with your editor link and we’ll try to set you on the right track. There’s just not much targeted help we can give you without seeing your data setup and how it interacts within the app.
Thanks Duke. Indeed I’ve gone through Echo’s and Kreator School’s tutorials. I understand the foundation of messaging, it’s just pairing it with data from the projects that I can’t seem to get my head around.
Basically I’m working on the project management template (Tasky). There, the user has the option of creating a new project and inviting other users. When that new project is created, I want the users of that project to be able to message each other in kind of a comment section. That comment section has to belong to that project, and change depending on the project.
I will look over the info you gave me, and keep you up to date. Thanks for the help!
Ok so as @talbotnar mentioned previously, you do need to add a field to your “project” thing. You have a thing type project and a thing type message. Inside the thing type “project” you should have a Field type “message” and check “this field is a list” to make sure you can link a list of messages. Let’s assume again that you have a page now with a project loaded somehow (it could be a the page level, or in a group or I’m not sure what your setup is). Let’s put in a repeating group that will load messages, and have the data type be messages. Let’s put the data source as PROJECT GROUP’S Project’s messages. Then that repeating group will only load the messages that you’ve added to that particular project’s “list of messages”.
Now all you need to do is when you create a new message, add a workflow saying "make changes to > PROJECT GROUP’s Project add result of step 1 (or wherever you created that message. Now your project should have an updated list of messages for that particular project and they should load in the Repeating group.
@Codeables method as you showed in your screenshot will work as well. The problem is probably that you’re not changing the project in the parent group correctly? I would advise against this method because it’s a lot more resource intensive in the search, as opposed to having a pre-loaded list of the messages associated to each project.
Thanks a lot, that seems to work! The messages are now part of one project.
The only thing I’ve noticed is that other users of that project don’t get to see the messages. It’s only the user who posted them.
First thing to check is whether or not you have any privacy rules enabled, you might be limiting messages to creator. If not, as previously mentioned, it’s difficult for us to check without access. If you’re comfortable you can set your app to “everyone can view” and either post a link or dm it.