version 6.0
SET WEB DISPLAY LIMITS (numberRecords{; numberPages{; picRef}})
Parameter | Type | Description | |
numberRecords | Number | Maximum number of records to display | |
in each HTML page | |||
numberPages | Number | Maximum number of page references | |
at bottom of each HTML page | |||
picRef | Number | Picture reference number for full page record button |
Description
The SET WEB DISPLAY LIMITS command modifies the way 4D displays a selection of records on the Web browser side when you call DISPLAY SELECTION or MODIFY SELECTION. This command only operates in contextual mode.
When you display a selection of records using 4D, the program does not load all the records of the selection; it only loads (from the disk) the records that are visible in the window at one time. In doing so, although you create a selection of thousands of records, displaying them is quite fast. Then, if you scroll or resize the window, 4D loads the records appropriately.
On the Web, 4D divides the selection of records to be displayed in pages. Without a paging scheme, a selection of thousands of records would result in thousands of records going over the Internet or your Intranet to be displayed in only one Web page. It also would take quite some time to download these records, and your Web browser would more than likely run out of memory.
By default, 4D displays the first 20 records of the selection and includes, at the end of each HTML page, 20 links to the first 20 pages of the selection. This means that, by default, you can browse the first 400 records of the selection by clicking on the page links located at the end of each selection page. Note that this paging system is transparent to your coding; everything happens within the call to DISPLAY SELECTION or MODIFY SELECTION.
SET WEB DISPLAY LIMITS enables you to change these settings. In the numberRecords parameter, you indicate the maximum number of records you want to display per selection page. In numberPages, you indicate the maximum number of selection page links you want at the end of each selection page.
For example, if you have a selection of 10,000 records and want to browse all of them in one display selection, you can pass numberRecords=100 and numberPages=100. However, remember that the data is going over the network or Internet; with the Internet, you must take the speed factor into account when changing the display selection settings.
In addition, SET WEB DISPLAY LIMITS optionally allows you to change the default icon of the full page record button. In the picRef parameter, specify the picture reference number of the picture stored in the database Picture library you want to use as new icon.
SET WEB DISPLAY LIMITS only affects subsequent calls to DISPLAY SELECTION or MODIFY SELECTION, and its scope is local to the current process.
Example
In the following example, a DISPLAY SELECTION or a MODIFY SELECTION is issued for a [Zip Codes] table. By default, 4D displays the records on the Web browser side as shown here:
Note that the first 400 records can be browsed.
If the following picture is added to the database Picture Library:
And, if the project method that displays the selection performs the SET WEB DISPLAY LIMITS call shown here, prior to the call to DISPLAY SELECTION or MODIFY SELECTION:
SET WEB DISPLAY LIMITS (50;100;17877)
Then the selection on the Web browser side ends up looking like this:
You can now browse the first 5,000 records of the selection.
See Also
DISPLAY SELECTION, MODIFY SELECTION, Using the Contextual Mode.