Appboard/2.4/builder/widgets/actions/refresh a data collection

Revision as of 18:33, 1 May 2014 by imported>Cmace (action filtering based on data source, not data collection)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The "Refresh a Data Collection" Action updates the data in a Data Collection to be the latest data in the server cache. This is the same operation that is performed automatically in the client each time that the "Polling Interval" is reached (as set in the Data Collection configuration).


In some AppBoard systems, there are potentially large amounts of data which may not be changing frequently. In these cases, it would not be efficient to be constantly polling for updates from the server. A more efficient approach would be to refresh the Data Collection on-demand at appropriate times, such as when the consumer is requesting to drill down to see a specific set of information. In this case, the "Refresh a Data Collection" Action can be configured to run when it would be needed.


The "Refresh a Data Collection" Action does not clear any filters that the end-user had applied to the current view of the data. It simply updates the underlying data to be the latest data on the server. When a User refreshes the browser, this is a stronger action which will refresh all Data Collections and remove all runtime filters that the User has applied.


How To Create a Refresh a Data Collection Action

For instructions on adding an Action to a Widget, see the general instructions in How To Create an Action in a Widget.


How To Configure a Refresh a Data Collection Action

Perform the following steps to configure a "Refresh a Data Collection" Action:


  1. Follow the instructions above to create the basic "Refresh a Data Collection" Action.
  2. Name: Enter a name for this Action. For convenience, a default name is provided. The Name is not used anywhere else in AppBoard, and only displayed on this configuration page.
  3. On selection of:
    1. Select "any" or "specific" for the type of data selection by the User that will trigger the Action. When selecting "specific", perform the following additional steps:
      1. Click the Filter button. The Filter Editor is displayed.
      2. Click Add Rule to create one or more rules that indicate what data should trigger the Action, when selected.
      3. Click Close to save the Filter settings.
    2. Select the Data Source name. When the Widget is run, selection of data in this Data Source will trigger the Action.
  4. Under Data Collection to Refresh, select the name of the Data Collection that you want to be refreshed when the Action is invoked.
  5. Click Close to exit the Widget Wizard and test the Action.


Sample Use Case

Suppose you are visualizing the pricing of securities. The securities data in the back-end database is updated every second with new prices. You have a Line Chart Widget in AppBoard called "Monthly Price Trend" that shows the price of a stock over the past month. The stock price Data Collection is set to poll the back-end database once per hour for the latest data.


When a User clicks on the "Monthly Price Trend" Widget, it switches to a Board with a Table Widget called "Recent Fluctuation" that shows the prices of the stock over the last 60 seconds.


Before launching the "Monthly Price Trend" Widget, you would want to invoke the "Refresh a Data Collection" Action. This will ensure that the current data is retrieved from the server and the most recent 60 prices are displayed.