Home » Developer & Programmer » Forms » To Stop saving when detail record is null
To Stop saving when detail record is null [message #493152] Sat, 05 February 2011 11:48 Go to next message
vijaykarthik_4
Messages: 1
Registered: February 2011
Location: INDIA
Junior Member

Hi,

I have master detail block just consider Forms A as a master and Forms B as a Detail,when my cursor is in form A i try to save the record, it is saved Form A and putting Form B data as null, i have to put a validation to stop this activity, i have to inform the user "Provide values for form B text item",

I created a post block trigger in form A

Begin

If (:FORM-B.TEXT1 is null)l or( :FORM-B.TEXT2 is null)
then

Message( 'provide value for FORM-B');
Message( 'provide value for FORM-B');
raise form_trigger_failure;

ELSE
NULL;
END IF
END;

Im Getting error message and navigation got stopped in last item of form A itself,i need to show error message and cursor control should move to first item of form -B please advice me which trigger i have to use for this.i

Thanks and regards
karthik
Re: To Stop saving when detail record is null [message #493211 is a reply to message #493152] Sun, 06 February 2011 13:39 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try WHEN-VALIDATE-RECORD on block A (instead of POST-BLOCK you use now).
Previous Topic: Multilingual Form
Next Topic: VB Activex DLL - How to Integrate with Oracle Forms
Goto Forum:
  


Current Time: Thu Sep 19 11:57:05 CDT 2024