Page

Block Group: Table Operations
Icon:Page block icon

The Page block returns a specified portion of the input table based on paging parameters.

This block is useful when designing an interface for paging through data. Regardless of whether the Page block is used, all of the input table data is loaded in browser memory. Therefore, paging does not improve performance.

For information on using dataflow blocks, see Dataflow.

For answers to some common questions about working with tables, see Tables.


Input/Output Properties

The following properties of the Page block can take input and give output.

  • input (table)
  • pageSize (integer)
  • start (integer)
  • nextPage (trigger)
  • prevPage (trigger)
  • firstPage (trigger)
  • lastPage (trigger)
  • currentPage (integer)

input receives the table for which you want to create paging.

pageSize specifies the number of rows per page.

start specifies the row index on which to start the current page. Rows before this index are omitted from the output.

nextPage advances the output table to the next page.

prevPage changes the output table to the previous page.

firstPage changes the output table to the first page.

lastPage advances the output table to the last page.

currentPage sets or returns the current page.


Output Properties

The following properties of the Page block can give output but cannot take input.

  • totalPage (integer)
  • output (table)

totalPage returns the total number of pages for this table.

output returns the portion of the input table specified by the paging parameters.


Example

The following image shows an example of the Page block. In this example, the output table holds the third page of data from the input table; in other words, the output table contains a five-entry page that begins with row 10 of the input data.

Page block example