saving record [message #477641] |
Sat, 02 October 2010 22:23 |
ahmed_best2001
Messages: 10 Registered: October 2010
|
Junior Member |
|
|
hi all,
i am using form6i & oracle 8i.
i have master -detail form. both are database blocks.
i have inserted values for the master block bt not for the detail record
my problem is..
"user should not be allowed" to move to next record of the master block before saving the current record
please help me
thanks
[Updated on: Sat, 02 October 2010 23:26] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: saving record [message #477710 is a reply to message #477692] |
Mon, 04 October 2010 00:46 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
A simple way to do that is to check whether detail block item (that is used to create a relation between master and detail block) is NULL.
-- WHEN-NEW-RECORD-INSTANCE on the master block
if :system.record_status in ('INSERT') then
if :detail_block.relational_item is null then
message('Detail block is empty!');
raise form_trigger_failure;
end if;
end if;
[Updated on: Mon, 04 October 2010 00:51] Report message to a moderator
|
|
|
|
|
Re: saving record [message #477821 is a reply to message #477789] |
Mon, 04 October 2010 11:11 |
ahmed_best2001
Messages: 10 Registered: October 2010
|
Junior Member |
|
|
Trigger :"WHEN-NEW-RECORD-INSTANCE" of the dept(master) block
if :system.record_status in ('INSERT') then
if :emp.deptno is null then
message('Detail block is empty!');
raise form_trigger_failure;
end if;
end if;
end;
Thanks
|
|
|