GetNextNumberWithGaps - PeopleCode Commands Directory
&number=GetNextNumberWithGaps(Record.Field, &MaxNumber, &Step, [&WhereClause [, &Param1...] ]);
DEPRECATED. SPr, WFl only. Returns highest value in Field (subject to WhereClause) plus Step. Use GetNextNumberWithGapsCommit
If this has not answered your question - either search on Google or ask a question below:
Create a simple Launch Page for your PeopleSoft Databases
Many applications use a sequence number as a unique key. The last number used is stored in a common table, and a SQL statement is issued to retrieve the last number used and update the table. This locks the common table until the whole transaction is saved and the unit of work committed.
Instead, consider using the GetNextNumberWithGaps PeopleCode function when gaps in the sequence numbering are acceptable. The function retrieves the last number used, increments it by one, and updates the common table. This is done in a separate unit of work, to minimize the time a database lock is held on the common table.
GetNextNumberWithGaps issues a commit only when issued from the SavePreChange or Workflow event.