Next - Built-in Database Function¶
Purpose¶
Returns the column value of the next database row.
Syntax¶
Next(column [, records])
Arguments¶
| Argument | Required | Description |
|---|---|---|
column |
Yes | Column name where the value should be retrieved from |
records |
No | The amount of following rows where the value should be retrieved from |
Returns¶
The type of column value (integer, date, string, etc.)
See also¶
IsDummyZeroDate, Previous, SQL, Sum
Example¶
if ({&Record Number} > {&Total Record Count}) then
return Next({Customer.Name})
else
return ""
end
let records = 0
while (IsEmpty(Next({Customer.State}, records + 1)) = false)
do
let records = records + 1
end
return Next({Customer.State}, records)
Notes¶
- When the next record is after the last record in the set, empty is returned. This can be validated with the IsEmpty function.
- The number of iterations of a while do end loop is limited to 1000.