Forum Academy Marketplace Showcase Pricing Features

Custom event when a post loads

Hey, I am building a social networking site and I have a home page where all the posts are visible. I want to create a change in the database when a post loads so that I can hide the posts that have been seen by the user. I am not able to find a way, can anyone help?

1 Like

Hello @rthdvinay welcome to the community!

Backend database trigger

Create a new dB trigger event:

Select the data type
Only when: thing before change is empty and thing now is not empty
This will detect when a new thing’s entry is created in the database
Add any actions needed upon this event

Thank you for the reply… let me try this out! :slight_smile:

1 Like

Didn’t work man… any other ideas?

Oops. When I read this post I thought that a new entry was created. I see that his is not the case. Thus my suggestion for a dB trigger on a new entry does not apply.

Explore the dB trigger with a change in condition… but this may be an overkill for what I understand that you need

Explore the event “do every X seconds” and set it so that it fires when an element becomes visible. This should allow you to detect when someone has seen something and then make a change to your database.

1 Like