Separate Comment

Good evening,
I have an application where people can post reviews of games, a bit like letterboxd for those who know. All you have to do is enter your five-star review, with the option of bookmarking it, and so on. The only problem is that I want to add comments that people can leave under each game.

The problem is that when I add the comment function, it gets mixed up between all the games.

Let’s say I leave a comment under the game Minecraft. My comment will also be visible under GTA V, Red Dead Redemption, … (basically all games)

Is there a way to separate each comment for each game? Give people the chance to give their opinion only for THE game they want and not have everything mixed up?



You have to add a rowID to the original games list, and then send that ID to the comments table when your users leave a comment.

Add a relation from the games table to the comments table through that ID and use that relation as your comments collection source.

1 Like

Did you have separate table for Commrnts?
It would have:
Game ID| User ID| Comment text| Stars
And you need to add multi relation from game table(game ID) to Comment table Game ID. And add comment collection with source of this rel

Hello @ThinhDinh and @slscustom.ru ,
I’ve been trying since this morning but I can’t get it to work (I’m new at this, sorry).

What I understood:

  1. Create a “Comments” table
  2. Separate them: Game ID| User ID| Comment text|
  3. Create a relationship between RowID (game table) and Game ID (Comment table).
  4. Create a relationship between RowID (Users table) and UserID (Comment table).

What’s next? I don’t understand what I need to do? Set the source of my comments to “Comment text” (Comment table)?

image
image

The relation in your user table probably isn’t necessary unless you have a specific reason for adding it.

When adding a comment, make sure all of the columns in the comment table are getting filled. You should see the relation in your game table get populated for each comment for each respective game.

Finally make sure that the comments collection is sourced from that relation.

I totally understand what you’re saying, but I have no idea how to apply it.
Would it be possible for you to give me the steps for example? If you don’t mind?
Or I’ll invite you to my glides

Which step are you stuck on?

Honestly, I’m still stuck on what I sent earlier.
I still don’t quite understand the relation between the tables etc.
I tried to do what the comments above said to do, but well.

The relation seems fine, but I would make sure to check the ‘Multiple’ checkbox because you will have more than one comment I assume.

Relations look for exact matches so as long as you are writing the GameID (RowID from Games table) to the comments table, then you should have exact matches between the game RowID and the ID written to the comments table.

4 Likes

Just mark as Multi and use it as sourse for comment’s collection element

1 Like

I did it! Thank you so much!
I’ll try to get on with the other things I need to create

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.