Hello Eddie,
the situation described is not causally related to a “batch copy” process, but in your case it can affect any type of new form creation.
The problem arises from an inconsistency in the database, which does not arise from intended (normal) use within the Visforms administration.
Inconsistencies in the database arise when changes are made manually directly in the database, i.e. bypassing Visforms.
This could well have happened unintentionally, for example:
- When form records are deleted directly in the database and at the same time the autoindex of the Visforms table for the form configurations is manually reset.
- If the Visforms table for the form configurations was manually deleted in the database, but not the associated Visforms data tables.
The situation described can be explained in detail as follows.
Short summary: Probably by manually deleting the Visforms table with the form configurations while retaining the 'old' data tables.
Possible solution in this case: Delete the 'old' data tables before creating a form.
If 'Save result' is set to 'Yes' for the first time in the form configuration, both data tables for this form will be created.
The two data tables are the table with the current (possibly edited) data and the table with the copy of the original data for restoring the original data after a data change in the administration.
The data tables are only deleted by Visforms in the following two cases:
a) The corresponding form is deleted via the Visforms administration.
b) Visforms has been uninstalled.
However, if the 'Save result' is simply reset to 'No', both data tables and the saved data will be retained.
Otherwise, it could very easily happen that the data is accidentally deleted.
If 'Save result' is later changed back to 'Yes', then Visforms only checks that the data table has the correct structure.
In particular, if fields have been deleted or added in the meantime, this will be corrected accordingly.
Data sets must therefore always be deleted as follows:
- manually in the data view of the administration, or
- using the ‘Auto Delete Data’ plugin.
There is an autoindex on the Visforms form table where the form configurations are stored.
This means that a new form can never be created with an ID that already existed at some point.
The behavior described can occur if the following happens:
- For some reason, a database contains old Visforms data tables.
- The autoindex of the Visforms table of a newly installed Visforms always starts at 1.
- At some point a form is created that then has an ID for which there is an old data table.
- Visforms now properly adapts the entire structure of the data table.
In this case, this means that the column value is deleted for all columns of the 'old' Visforms fields because the form simply does not have these fields (IDs).
- Afterwards, only the 'overhead' fields in the 'old' data sets are filled with values.
This would also fit well with the old date of the records.
Kind Regards, Ingmar