Appboard/2.5/builder/widgets/actions/refresh a data collection: Difference between revisions
imported>Cmace (action filtering based on data source, not data collection) |
imported>Jason.nicholls m (1 revision) |
(No difference)
|
Latest revision as of 15:52, 26 June 2014
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:
- Follow the instructions above to create the basic "Refresh a Data Collection" Action.
- 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.
- On selection of:
- 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:
- Click the Filter button. The Filter Editor is displayed.
- Click Add Rule to create one or more rules that indicate what data should trigger the Action, when selected.
- Click Close to save the Filter settings.
- Select the Data Source name. When the Widget is run, selection of data in this Data Source will trigger the Action.
- 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:
- Under Data Collection to Refresh, select the name of the Data Collection that you want to be refreshed when the Action is invoked.
- 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.