I've got a master/detail relationship with the master record in one table and detail records in another, joined on a key field. I want to make sure the user can't save a master block record without having at least 1 (valid/complete) record in the detail block, but this is my first attempt at this and I'm floundering.
It saves fine to both tables if you enter the data correctly, but I don't know how to loop through the detail block to see how many records are entered or to validate more than just the first one.
On the When_button_pressed trigger of the Save button, I call a function to validate the data in both blocks. I am using Get_Block_Property (block_name, CURRENT_RECORD) to find out about the first record in the block, but I don't know what to do from there -- how to loop through, what to do if I do find an error, or how to let them save the corrected version.
Any insight would sure be appreciated... Thanks!
Carolyn
It saves fine to both tables if you enter the data correctly, but I don't know how to loop through the detail block to see how many records are entered or to validate more than just the first one.
On the When_button_pressed trigger of the Save button, I call a function to validate the data in both blocks. I am using Get_Block_Property (block_name, CURRENT_RECORD) to find out about the first record in the block, but I don't know what to do from there -- how to loop through, what to do if I do find an error, or how to let them save the corrected version.
Any insight would sure be appreciated... Thanks!
Carolyn