A script-enabled browser is required for this page to function properly.

GENERATE_SEQUENCE_NUMBER Built-in

Description

Initiates the default Oracle Forms processing for generating a unique sequence number when a record is created. When a sequence object is defined in the database, you can reference it as a default value for an item by setting the Initial Value property to SEQUENCE.my_seq.NEXTVAL. By default, Oracle Forms gets the next value from the sequence whenever a record is created. When you are connecting to a non-ORACLE data source, you can include a call to this Built-in in the On-Sequence-Number trigger

Syntax

PROCEDURE GENERATE_SEQUENCE_NUMBER;

Built-in Type unrestricted procedure

Enter Query Mode yes

Parameters

none

GENERATE_SEQUENCE_NUMBER Restrictions

Valid only in an On-Sequence-Number trigger.

GENERATE_SEQUENCE_NUMBER Examples

/*

** Built-in: GENERATE_SEQUENCE_NUMBER
** Example: Perform Oracle Forms standard sequence number
** processing based on a global flag setup at
** startup by the form, perhaps based on a
** parameter.
** Trigger: On-Sequence-Number
*/
BEGIN
/*
** Check the global flag we setup at form startup
*/
IF :Global.Using_Transactional_Triggers = 'TRUE' THEN
User_Exit('my_seqnum seq=EMPNO_SEQ');
/*
** Otherwise, do the right thing.
*/
ELSE
Generate_Sequence_Number;
END IF;
END;