This content has been marked as final. Show 5 replies
One thing that you can do is to create 3 triggers on your block:
Then look if the checkbox is checked;:
example with ON-INSERT:
If :block.check = 1 Then Insert_record ; End if ;
I have a database based block.. in which I'll populate a number of records retrieved from a cursorIn general these two are mutual exclusive. Either you base your block on a database table/view, or you populate it by using a cursor. So, what way do you use?
The source of the block is based on a table.
The block is a multi record block, what I intend to do is to insert some records from a cursor into that block, then after the process of populating is complete, I'll save those records in the table.
Commit processing in Forms is an all or nothing process. You cannot pick and choose which records will be commited during a Commit_Form or Commit call. Based on your description, I don't see why you would need to use the checkbox to keep track of which records are new since you state that you add the records through a cursor and then to save them. Forms already keeps track of which records were queried into a block and which records are new so a simple call to Commit_Form will accomplish what you want without the need to manually keep track of which records are new.1 person found this helpful
Hope this helps,
If a response is helpful or correct, please mark it accordingly.
With respects to my previous post, I have recently learned that you can actually perform the kind of COMMIT processing you are attempting by using the On-Insert trigger. You can perform your test of the CheckBox and call the Insert_Record built-in if the test passes. For example:
Sorry for any confusion.
/* On-Insert Trigger */ BEGIN IF ( :MY_BLOCK.CHECK_BOX = 'Y' ) THEN Insert_Record; END IF; END;
Edited by: CraigB on Apr 21, 2010 4:17 PM