Updating list of comments in the database

Hey Team,

I feel like this is probably a really stupid little thing that I am missing but I am tearing my hair out, so any help would be very much appreciated.

So in short, I am building a Social Media style app. I have built a comments system which is all working bar one thing. Every time a comment is made I want it to add the comment_unique_id to the post table (which includes the field 'comments_list which is a type is a list of comments.

Any help would be greatly appreciated. I have attached a few images of the database and the current workflow
.

Hi there, @toff… if I understand your setup correctly, you are creating the comment in step one, and I would just have the next step make changes to the tick to which the comment was added, and the change would be to add the result of step 1 to the tick’s comment list field.

Apologies if I have misunderstood your setup or what you are trying to do, but it looks like it could be that straightforward.

Hope this helps.

Best…
Mike

Hi @mikeloc,

Thank you for your reply, yes I think that is correct. I have tried this, but still isn’t adding it:

I don’t think you want to make changes to a list of comments. You want to make a change to the tick to which the comment was added in step one, and then add the result of step one to the tick’s comment list field.

This make perfect sense and is working perfectly! Thank you sooo much!

1 Like