Zoomed Image

AMSX Scripting Language - Command : CalculatePage

Summary

Calculate the total number of pages for a paged result set

Description

Given a total item count and a page size, returns the number of pages required. Returns 0 if either value is zero or if item count is 0. Uses integer division.

Parameters

ParameterDescription
cmdtotal number of items
Argument 0items per page

Syntax


CalculatePage "total number of items", "items per page"

Return to the AMSX Command Reference