Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Function Index > N

NEXT

Scroll Prev Top Next More

(NEXT(tblname,autonumcol))

 

Returns the next value of an autonumbered column.

 

Where colname is an autonumbered column in tblname NEXT returns, and increments, the value of the next available autonumber. You cannot use this function with INSERT, but you can use it with LOAD;NONUM. For example: Assume that you have autonumbered the column EmployeeID in the table Employees. The highest number currently used in the database is 134. In this case, in the following example, the value of vNextOne will be 135 and the value of vNextTwo will be 136.

 

Notice that the value has incremented even though no other commands or functions were issued.

 

SET VAR vNextOne = (NEXT(Employees,EmployeeID))

SET VAR vNextTwo = (NEXT(Employees,EmployeeID))