Update column from another table

Hey guys,

I have a checkbox in a separate table that I need to update for a specific RowID. Is this possible?

So there is a follow button on a page that adds a thread/question to a users following list (a separate table) , follow adds a new row to the new table.

I need the unfollow button to update that specific row after its created rather than creating a new one again.

If you have a way to create a query/relation to the following table then that would certainly be doable.

Assume the experience is like this: a user comes into another user’s profile, click the “Follow” button, then a row with the following user’s ID, the followed user’s ID is created.

The query created in the Users table would look at the Follows table, filter for “following ID” equals signed-in user’s ID, “followed ID” equals this row’s ID.

The “unfollow” button would delete the row through the query.

1 Like

I ended up solving this another way with a user specific boolean column and then filtering a collection when that is enabled and has been working fine so far.

Will test a few more scenarios with it today so hopefully all good.

Thanks Thinh

If you don’t need the followed user to see his/her followers then that approach should be fine.

1 Like