Home » Developer & Programmer » Forms » Stop navigation to next record from blank record (Oracle Form builder 10g)
Stop navigation to next record from blank record [message #399552] Wed, 22 April 2009 22:24 Go to next message
lakshmi173
Messages: 1
Registered: April 2009
Junior Member
Hi,
I have a database block with 3 fields from a table. DML is allowed. The block also has a check box which is not from the table. If the user clicks on the next record (new) of the last record and select the check box and then click on its next record (2nd new) it allows to navigate. But the user should stay in the 1st new record until he enters data in atleast one of the 3 fields. He can navigate to previous existing records. I wrote the following code in WHEN-VALIDATE-RECORD of the block. If I raise form_trigger_failure here, the user will not be able to move anywhere even to previous records.

IF :block.field1 IS NULL
AND :block.field1 IS NULL
AND :block.field1 IS NULL
THEN
:block.check_flg:='N';
Set_Record_Property(:system.cursor_record, 'BLOCK', STATUS, NEW_STATUS);
END IF;

I wrote the following code also in KEY-NXTREC and KEY-DOWN, but it allows the user to navigate to next record using the mouse.

IF :block.field1 IS NULL
AND :block.field1 IS NULL
AND :block.field1 IS NULL
THEN
message ('Record must be entered or deleted first.');
RAISE form_trigger_failure;
END IF;

Please help me. Thank you.
Re: Stop navigation to next record from blank record [message #399554 is a reply to message #399552] Wed, 22 April 2009 23:48 Go to previous message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why didn't you RAISE FORM_TRIGGER_FAILURE in the first trigger as well?
Previous Topic: Deploy Forms on Web
Next Topic: Tool to integrate the application
Goto Forum:
  


Current Time: Tue Dec 06 04:43:38 CST 2016

Total time taken to generate the page: 0.09610 seconds