Get when Database is Updated (Unsolved)

Is there a way Client Side to get when a dataset insert happens? Condition: The user is Not the one who called the update().
Need to update a list when users submit in real time.
I know i could create this effect by checking every X seconds but that keeps the table constantly in the loading state and doing this with repeaters just freezes everything.

Hello Ethan

you can add afterUpdate() hook to your data to achieve that. further information here .

Best
Massa

Thats all ffine and ddandy but does not work under the conditions. I wwwant the sscript to run on the users page and ththey had nnothing to do wwith updating ththe datdadata
(I ccant fix tthe typos on mobile its bebeebebeen doing ththis for sosome reasoreason if i hit backspace ever on a word )

Thos bug happe s when typing dfrom the GMail

on a computer now. that weird bug above the forum is adding Predictave Text and Typo Corrections on my phone to the textfield like i have typed them anytime i hit backspace

happens when Gmail opens the forum in it’s browser when clicking Check it Out on Mobile to respond to a notification

@ethan-snow

hooks work on the collection itself no matter who updated it, so after it’s updated it’ll do a certain functionality.
however another option if you want the check to happen after a submission, you can an event on the submit button it self after it’s clicked.

if that’s not what you meant would you please give more details of what functionality your exactly trying to have after updating , and provide the link of your website for further help :slight_smile:

Massa

@massasalah18 Like THIS forum for example. i want the code to run CLIENT SIDE when the data is updated to pull the new info and add to their page

The use is for User to User messaging. The code all works but wont update the chat in ‘Real Time’ and using repeaters to query the database every x seconds is not ideal

@ethan-snow all rendering happens client-side by default unless otherwise specified . check this

@massasalah18 so putting a dataHook on the Backend will somehow let me talk to the FrontEnd of every user on the page? from my understanding it does not work that way.

@ethan-snow yes or by using other options like on submit button event. what do you exactly want to show the users when the data is updated ?

@massasalah18 exactly like we are doing right now. Every time you send a message I see it immediately. I am trying to have the Other use who did Not send any data receive a trigger that there is new data in the database and they it has to get it and display it.

I am trying to display the inserted data on the page of a user who did not send the insert call as soon as it is added to the database.

Is this possible currently?

@Massa : I think Ethan is trying to explain that he wants to have an updated result of SOME action and PUSH or (what he suggested, PULL) the result to other visitors looking at the same page. Example: 10 visitors are looking at a page, 1 buys something, all visitors to this page now receive a message “Bought just now: 12 head scarfs”.
I think he suggested a PULL from the client, prob. on a time-out, but he stated it runs into problems and asks if there is another solution.

Exactly ^

Hello Ethan

Did you Try adding a hook and refreshing the database and it didn’t work for you ?
Would you please provide me with your website link

Best
Massa

I could add ththe hook but tthen i get the issue… how do i modify contents on the screen for users fromI could add ththe hook but tthen i get the issue… how do i modifyombandkou.bndkou.com/suite: iombandkou.bombandkou.com/suombandkou.bomban

Replyong on mobmobile is completely lbroken

Ok i can add the qebhook but now i get a nnew issue. How do i interact with text and repeaters on the Front end from the Backend with no way to send info To tthe frontend from the hook.

Exact url i am using tthis for: .https://www.bombandkou.com/messages

@ethan-snow I’ll check it out and update you. thanks