Duplicating record containing binary field

In a database containing a binary field, if (via Records > Duplicate Record) I duplicate a record in which that field contains valid binary data, it is corrupted in the duplicate record.

Here is a single-record, single field database with a valid binary field (in this case containing a dictionary):

and the result of duplicating that record — the field in the second record cannot be read:

I originally found this when copying a binary field and pasting it into another. I wasn’t particularly surprised that the pasted field was corrupted because I wouldn’t necessarily have expected the clipboard to be able to hold binary data . Also binary fields are automatically set not to be editable and I probably shouldn’t have enabled that in the first place. Copying a whole record and pasting it (which ignores whether fields are editable) causes binary fields in the pasted record to be corrupted in the same way.

However, I was hoping that duplicating a record wouldenable the binary field to be replicated in the new record, but it isn’t.

I haven’t tested this with all possible contents of binary fields, just dictionaries and data arrays. There are possible workrounds for this of course, such as a procedure to read the field from the source record into a variable and write that to a field in the destination record, but nothing as simple as the tools provided to work with the data sheet.

Sorry, this is a bug that is already in our known list of problems. The solution is going to require a complete rewrite of the duplicate record feature. Right now, this feature is implemented by repurposing the copy/paste code, which as you discovered, doesn’t work.

Thank you.