Archive

Posts Tagged ‘default value’

AUTONUMBER

October 15th, 2011 No comments

In Syteline form grid, if you have line# and you want it to be auto populated, you may use the AUTONUMBER function, just set the component default value property to AUTONUMBER.

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)))