Detail block [message #641306] |
Thu, 13 August 2015 03:19  |
 |
palpali
Messages: 138 Registered: December 2014 Location: India
|
Senior Member |
|
|
Hallo
I have mater-detail blocks. In detail block, when i want to insert new record then the 4 fields are automatically duplicated as above and the 5th field is empty and must be given. (property Required = yes).
When i insert records in first detail block and go to the second block where i unintenstionaly, press F7 key then it will make a new row with 4 fields' value as above it, and the 5th as empty. But i don't want to enter any value in this field and dont want save any records in second block and want to go first block and/or save the newly inserted records.
But, the problem is, i can not go to the other block without giving any value in the 5th field. and in my case, i just want to save the data in the first detail block without saving the record in the second block. and when i press F4, form exit completely.
WNRI in my detail-block
if :system.block_status = 'QUERY' then
if :system.record_status = 'NEW' then
duplicate_record;
set_block_property('blk1', insert_allowed, property_true);
:blk1.field5 := null;
set_record_property (:system.trigger_record, :system.trigger_block, status, changed_status);
end if;
end if;
Please help,how can i do this?
Regards,
|
|
|
|
|
|
|
|
|
Re: Detail block [message #641348 is a reply to message #641326] |
Thu, 13 August 2015 09:00  |
 |
CraigB
Messages: 386 Registered: August 2014 Location: Utah, USA
|
Senior Member |
|
|
You can use the F6 - Clear Record or Ctrl + Up Arrow - Delete Record function keys to clear/delete the "Unintentional" record.
|
|
|