WEBDEV Concepts

180 Part 5: Databases The Table/Looper control Table/Looper controls can be used to display a set of information (e.g., the content of a data file). The content of these controls can come from three different sources: • Table/Looper controls with direct access to the data source. • Table/Looper controls populated programmatically. • Table/Looper controls with in-memory data source. Remark : These three modes will be explained in detail for the Table control. However, the same concepts apply to the Looper control. Table control with direct access to the data source A Table control with direct access to the data source directly displays data from a data file or query. The data file structure is described in the data model editor and the data is entered in the site, for example. When you loop through the data file, the data is displayed in the Table control. The data file is read for each row displayed: the record read is displayed in a row of the Table control. Customer file The data displayed that is not linked to the data file is lost when the Table control is refreshed (when scrolling, for example). The number of records displayed in the control can be limited by setting a filter ( HFilter used in the control initialization code). Several WLanguage functions can be used to handle Table controls based on a data file. These functions start with "Table". To add a record to the Table control , add the record to the corresponding HFSQL data file (using HAdd ) and refresh the Table control with TableDisplay . To delete a record from the Table control , delete the record from the corresponding HFSQL data file (using HDelete ) and refresh the Table control with TableDisplay .

RkJQdWJsaXNoZXIy NDQ0OA==