*page Function
Syntax
*page(N start_position, N page_size)
Arguments
- start_positionNumeric
The starting logical record number (zero based).
- page_sizeNumeric
The number of records to fetch.
Description
Used with table.external_record_content_get() to limit the rows of data returned.
Discussion
*page() takes two arguments: starting logical record number (zero based) and 'page' size. It is designed for use in the table.external_record_content_get() function to limit the rows of data that are returned.
Examples:
Return 3 records starting with the first logical record (record 0):
?table.external_record_content_get("customer","lastname + recno()","","*page(0,3)") = Graham 1 Peabody 2 Rebo 3
Returns 4 records starting with the 8th logical record:
?table.external_record_content_get("customer","lastname + recno()","","*page(7,4)") = Cario 8 McMiggan 9 Dubi 10 Winka 11
This example is more complex. It returns the data in the JavaScript JSON notation for use in a Web application:
dim fl as c fl = comma_to_crlf("firstname,lastname,firstname-' '+lastname as fullname") ce = "*json_record(" + s_quote(fl)+ ")" ?table.external_record_content_get("customer",ce,"bill_state_region"," bill_state_region='ca'.and.*page(0,5)") = {firstname : 'Willy' , lastname : 'Winka' , fullname : 'Willy Winka'}, {firstname : 'Yvonne' , lastname : 'Harrington' , fullname : 'Yvonne Harrington'}, {firstname : 'Joan' , lastname : 'McAndrews' , fullname : 'Joan McAndrews'}, {firstname : 'Leonard' , lastname : 'Burtonski' , fullname : 'Leonard Burtonski'}, {firstname : 'Peter' , lastname : 'Harrison' , fullname : 'Peter Harrison'}
Limitations
For use with the table.external_record_content_get() method
See Also