When I use a procedure to duplicate a record, some of the fields in the new record are left empty. Here are the details.
A form has 16 text editor objects. A button on the form allows the use to duplicate the record. The button does a farcall of the following procedure:
Alertsheet "Do you want to duplicate record "+«Case #»+
"?","Buttons","Yes,No"
If info("dialogtrigger")="No"
rtn
endif
«Duplicate?»="Y"
duplicaterecord
ID=aggregate({ID},"max",{},"",true())+1 //Assigns the new record a unique ID
showvariables fgdummy
rtn
Of the 16 fields, 11 are duplicated but 5 are empty. I cannot find any explanation for the difference.
Update: if I replace the duplicate record line above with copy record paste record, the problem is solved. All fields are duplicated.
So, duplicaterecord and copyrecord/pasterecord actually do the exact same thing! I guess the one difference is one uses insertbelow and the other uses insertrecord. But that shouldn’t make any difference.
Is there anything unusual about the 5 empty fields? Are they text, numbers, binary data?