AUTONUMBER keyword

Applies To

Form components.

Component property: Default value.

Description

Sets the value of a component on a New operation to an automatically incremented numerical value.

Syntax

AUTONUMBER( [ STEP( ) ] [ FILTER( ) ] )

Remarks

During processing of the New standard operation, AUTONUMBER sets the value of the component to the highest value of a property, determined from both the collection and the application database, plus the increment specified by the argument of STEP.

If STEP( ) is omitted, AUTONUMBER uses a default increment of 1, setting the value of the component to one greater than the highest value in the collection and in the application database.

If FILTER is omitted, WinStudio attempts to construct filter criteria to retrieve the current maximum value from the application database.

Example

AUTONUMBER(STEP(1) FILTER(OrderNo=FP(OrderNo)))