Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

KEY-DUPREC trigger in Oracle Forms

Status
Not open for further replies.

CTO1

Technical User
Jun 17, 2003
14
0
0
GB
Hi, I've got 2 data blocks which are both referencing the same table but will display in different canvasses.
When you double click (WHEN-MOUSE-DOUBLECLICK)triger fires
DO_KEY('DUPLICATE_RECORD'). I'm trying to set up the KEY-DUPREC trigger so that the second canvas will display with the correct record.
The syntax I'm using is
GO_BLOCK('BLK_B');
SET_BLOCK_PROPERTY('BLK_B',DEFAULT_WHERE,
'BLK_B.COLUMN_A := :BLK_A.COLUMN_A and BLK_B.COLUMN_B := :BLK_A.COLUMN_B');
EXECUTE_QUERY;


However no matter which record I double-click on in BLK_A it always returns the first record in BLK_B.

Have written the syntax wrong or is it a case of incorrect properties in the palette ?
 
You need to to a GO_RECORD prior to navigating to block B.

Code:
GO_BLOCK('BLK_A');
GO_RECORD(:SYSTEM.MOUSE_RECORD);
GO_BLOCK('BLK_B');
SET_BLOCK_PROPERTY('BLK_B',DEFAULT_WHERE,
'BLK_B.COLUMN_A := :BLK_A.COLUMN_A and BLK_B.COLUMN_B := :BLK_A.COLUMN_B');
EXECUTE_QUERY;

If this is forms 6 and the above code doesnt appear to work, create a WHEN-MOUSE-DOWN trigger at form level containing a NULL;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top