In Process Indication

I have a page with a couple Status Charts as well as some query functions that take probably a good 10 seconds to load when the start/end date are changed.

Is there a way I can have some visual indication that the update is still in process so that we know the date change is finished?

I use a horizontal progress bar with the Indeterminate behavior set to true so it just keeps going back and forth. I paired it with a “Loading” label and made it into a template. Before starting my invokeAsynchronous process I make it visible and in the invokeLater I hide it.

If you are getting gui stalls due to long queries, and those queries are composed of historical tables (SQL Bridge style), you might consider the new Time Series Database Cache module. Built specifically for that case. Since a chart using this tool fills in as the chunks of data arrive, a separate progress indicator may not be needed.

There is also a component pallette that Lionel (mazeyrat) posted.

https://inductiveautomation.com/forum/viewtopic.php?f=88&t=10325&p=36596&hilit=byes#p36596

Thanks guys! I really like the community on these forums. Always find an answer!

Bumping an old thread…

I am using 7.9.10 and I have a SQL Query binding on the root container of a screen in my project. The query counts frequency and sums up duration of alarms in the alarm journal, so there is a fair amount of data. This query is updated when a time slider is adjusted. My problem is that, depending on the range of the slider, it can take a fair amount of time to return results. While it is updating it just looks like the result is blank (a couple of pie charts are supposed to display the returned data). People have a tendency to try and move the slider again during this blank period, resulting in even longer blank periods which leads the user to eventually give up, and exclaim that the screen is broken! Is there a way to assign a tag value or do something to indicate to the user that the system is actually working?

No, there’s no “busy” indicator for a query binding. Consider not linking the slider directly to the query binding. I would:

  1. Create an additional root container property (or properties) to hold the slider value(s).
  2. Use a propertyChange event on the slider to capture changes that should be forwarded to the query, but instead just start or restart a timer component. It would also hide the result graphics from the query, so the user knows change is pending.
  3. When they stop moving long enough for the timer to finish, its actionPerformed event would disable the slider, and copy to the final root container properties. This starts the query.
  4. Use a propertyChange event on the root container to catch when the query finishes, to make the graphics visible and re-enable the slider.
1 Like

You can use invokeAsynchronous and enable / disable a “loading” component.
You can also cheat and put an invisible power table component and bind the data on it. The power table component has a propertiesLoading property that is true while properties are loading on the table.

3 Likes