Auto Refresh after table record updated/inserted

Hello All,

i have an enity which is displayed to a table to several users. 

Every user can add aytime new table record or to update any entity record. For every new entity record or when a record updated, the table to be refreshed to all users.

George Mitsiou wrote:

Hello All,

i have an enity which is displayed to a table to several users. 

Every user can add aytime new table record or to update any entity record. For every new entity record or when a record updated, the table to be refreshed to all users.

Hi George,


Please check the attached auto-refresh demo example.


Thanks for the oml sharing and for your actions.

The request is not to press on any button to refresh but the x table to be refreshed automatically when any user update or insert new record to this x  table.

George Mitsiou wrote:

Thanks for the oml sharing and for your actions.

The request is not to press on any button to refresh but the x table to be refreshed automatically when any user update or insert new record to this x  table.

you mean like push notification?


??.

Lets me explain the request again.

i have a table named x in which saved several data from different users of my company. So this means that a lot of company users see the table and save data to it.
I want for every update/new data entry , the table to be refreshed automatically to all company users

Hello George.

The easiest approach is to have a simple javascript checking for updates that refreshes the screen when changes appear.

Are you doing it in Traditional, Reactive or Mobile?

In traditional web.

your support on this is highly appreciated!

George Mitsiou wrote:

In traditional web.

your support on this is highly appreciated!


As Nuno said you can do only it by javascript or jquery,check after some-second if data coming or not in your entity and then refresh grid.

I shared the oml that we can achieve same in Reactive web app.


For traditional web app you can refer the below post solution.Hope this help.

https://www.outsystems.com/forums/discussion/45073/how-to-reload-a-screenaction-every-30-seconds-with-javascript/

So, I took a look at the link provided, and Manish's suggestion is fine.


Be aware that some Javascript connecting each client to the server every second is not great for performance.

I have an action that

  1. checks most recent date in DB 
  2. compares with most recent date on page data
  3. Only if there is new data, fetches data and refreshes screen.

You can remove the Feedback_Message2. it is only there to prove the action is called.


Regarding the timer, it simply generates random entries at random times. Don't focus on that.

Thanks for your reply.

My request is not to set time to refresh but this to be done automatically when new data inserted or the existing updated. The provided oml refresh every x time the table. it is different from that i request to advise. 

The timer was only to create data. You can create manually if you do another screen.

Regarding the updates, the two only ways of doing it is:

-The browser listening for server (you don't want to implement that)

-the browser checking for changes regularly (this way)

if you remove the feedback messages and increase the time in the js, you won't even notice.

I dont get you! Sorry :(

The timer is about what?

The request is to refresh the page when new data inserted. If new data inserted after 1 month, then why you set timer?Does the timer knows when the new data will be inserted? 

Forget the timer. It is only to insert some data.


JavaScript calls a fast query to see it there is new data. It there is, it calls the heavier set of actions to get the data.

This is only an example of how to do it. You can adapt.