Subject | Re: [IBO] Duplicate a record |
---|---|
Author | Geoff Worboys |
Post date | 2000-12-03T07:47:07Z |
> Do you like the sound of an InsertCopy method that will insertI have stub functions in my application for a function called "Save
> a copy of the existing record?
>
> Shall I add a button for it on the TIB_UpdateBar?
>
> Also, I would be sensitive to the GeneratorLinks and
> DefaultValues. They would apply over the top of the copied values.
>
> Any other thoughts for this?
As", and this stuff sounds like the base I need to make that function
do something.
After the duplicate it seems safe and appropriate to reset any
generated fields with a new generator value (since you expect the
generators to fire on any insert).
However I dont think you will want to reset fields with default
values - since these are really only there to fill fields not
specified by the user, and I would presume that you will only want to
copy a record that has already been filled in (and/or defaults
applied).
It would also be convenient to provide an AfterDuplicate event to
allow the developer to provide duplication specific initialisation.
FWIW
Geoff Worboys
Telesis Computing