Showing data in an HTML table in real time

Showing data in an HTML table in real time

I have a dashboard which has a stateless form with a notes field in it. The notes field is outputting an HTML table which is fetching data from a regular form.

I wanted the table to show data in real time, without having to manually refresh the tab or using Tampermonkey/auto refresh extensions. I started searching around and didn't find anything about it. I found a solution.

In my stateless form I have added in a Decision Box. Then I created a workflow on user input of the decision box. 
The code will be something like this:

  1. if(Decision_box == true)
  2. {
               //fetch data
  3.            //put data into notes field HTML Table
  4.            input.Decision_box  = false;
  5. }


  6. else if(Decision_box == false)
  7. {
               //fetch data
  8.            //put data into notes field HTML Table
  9.            input.Decision_box  = true;
  10. }

After that I created another workflow on Load of Form:

  1. input.Decision_box = true;
This creates an endless loop and the data is updated in "real time".

I am unsure how stable this is, but we can use a few seconds of delay with httpstat.us in case it isn't stable.

I have attached a video to show the process in action.