Dynamic Data Sources
The Dynamic Data Sources tab of the Resource Manager dialog provides a convenient way to configure dynamic data sources for use with Listview buttons in your TPD5 project (FIG. 42).
FIG. 42 Resource Manager dialog - Dynamic Data Sources tab
Modero X Series G5 touch panels and TPDesign5 (v1.2, build 65 or greater) support Listview buttons. Listview buttons provide the ability to display a listing of items from a dynamic data source on a G5 touch panel.
NOTE: See the
Listview Buttons & Dynamic Data section on page 104
for information on Listview buttons.
Dynamic data defines data files/feeds URL where the data can be loaded by the touch panel at runtime via HTTP (GET) or HTTPS (GET) transport protocols.
Dynamic Data Sources are data sources that exist on the NetLinx Master (or an HTTP server) external to the panel. Data source f iles can be CSV files either with or without headers, XPort-generated XML, or NetLinx code.
The creator of the data can specify how many fields comprise a record and the format of those fields. As many records as necessary can be specified. This data can be used to populate a Listview button displayed on a G5 touch panel, where the end user can scroll or search through the list and make a selection.
Once a selection has been made, a CUSTOM_EVENT is raised in the NetLinx Master to retrieve the data fields comprising the selected record and potentially trigger events.
Refer to the Listview Buttons & Dynamic Data section for working demos of creating Listview buttons using four types of source data:
CSV file with headers
(page 114)
CSV file without headers (page 128)
- XPort-generated XML file (page 141)
- NetLinx Data Source (page 154)
Adding Dynamic Data Sources to the Project
The following example steps you through the process of adding a Dynamic Data Source file to the Resource Manager (for use with Listview buttons).
- In the Dynamic Data Sources tab of the Resource Manager, click New to open the Create Dynamic Data Source dialog (FIG. 43):
FIG. 43 Create Dynamic Data Source dialog (with sample data)
- In the Name field, enter a unique name for the Data Source. The name entered here will be used to identify this file in the
Resource Manager - Dynamic Data Sources tab and the Select Resources dialog.
- In the Host field, enter the host name, which must be a fully qualified DNS or IP address.
- In the Path field, enter the path to the source file. The path must be a valid HTTP URL minus the protocol and host. The only exception to this is the inclusion of special escape sequences and regular expressions.
- In the File field, enter a file name that indicates the full path to the location of the source file.
- In the User field, enter the user name required by the NetLinx Master or server for authentication (if required).
- In the Password field, enter the password required by the NetLinx Master or server for authentication (if required).
- In the Refresh Rate field, use the up/down arrows to adjust the number of seconds between refreshes in which the resource is downloaded again. Refreshing resources will cause the button displaying that resource to refresh as well. The default value is 0, which means that the resource is only downloaded once.
- Set the Refresh only at panel startup option. This option is only available if Refresh Rate is set to zero, and causes the dynamic data to refresh only upon restart of the panel, as opposed to upon each visit to the page (as is the default).
- Specify the format of the source file:
- XPort - Select if the Data Source file is XPort-generated XML (default selection).
- CSV (Headers) - Select if the Data Source is a CSV file with headers.
- CSV - Select if the Data Source is a CSV file that does not have headers.
- Click OK to save changes and close this dialog. The new data source is indicated in the Dynamic Data Sources tab (FIG. 44):
FIG. 44 Resource Manager - Dynamic Data Sources tab indicating an example Data Source File
Editing Dynamic Data Sources
- In the Dynamic Data Sources tab of the Resource Manager, select a data source.
- Click the Edit button to open the Edit Dynamic Data Source dialog (FIG. 45).
FIG. 45 Edit Dynamic Data Source dialog
- Edit the Data Source information as desired.
- Click OK to save changes and close the dialog.
Deleting Dynamic Data Sources From the Project
- In the Dynamic Data Sources tab of the Resource Manager, select one or more files to delete (Ctrl + click to select multiple files individually, or Shift + click to select a range of files).
- Click the Delete button (FIG. 46):
FIG. 46 Deleting a data source from the project