Index Server uses the .htx file mainly to format the results of a query. Query results are split into pages based upon the parameter CiMaxRecordsPerPage. The total number of query result records is governed by the parameter CiMaxRecordsInResultSet. The current page number in the result set is given in the variable CiCurrentPageNumber. For a nonsequential query, the CiTotalNumberPages variable gives the total number of pages in the result and CiRecordsNextPage gives the number of records on the next page. The variables CiContainsFirstRecord and CiContainsLastRecord indicate whether the current page is the first or last in the result set. For an example of how to navigate between pages See Navigating Between Pages in Query Results.