This is the documentation for ConfiForms Server/Data Center app
Issues with forms having an auto-number field after upgrade
With ConfiForms version 2.x we have updated and improved the storage service, the way how we store and manage your ConfiForms data is very different to what it was in version 1. We have optimized a lot of requests and functions and made ConfiForms perform a lot better with larger datasets.
These improvements have affected the way we generate auto-number for each new record you save in ConfiForms.
We don't analyze the data you have and don't try to find the greatest number used but we do a simple count over the data stored, adding +1 to the found number.
This logic works fine for migrated data as well, as long as you have all the records in the form. If you have deleted any of the records in the forms with auto-number fields then there will be an issue with duplicates.
We have fixed the data migration logic in ConfiForms 2.0.9. So, if you are upgrading from ConfiForms version 1.x to 2.0.9 there is nothing to worry about.
However, if you have migrated to the version prior to 2.0.9 then there is a need to fix the data on the database layer
There are 2 options here (as of now):
ConfiForms stores data in the table "AO_CEFA84_CONFI_FORMS_ENTITY"
You will need to count how many records are missing and do the SQL INSERTs into the mentioned table with "deleted" flag set to true
Where parameters are:
- <PAGE_ID> - page id where the form is defined
- <FORM_NAME> - name of the form
- Another option is to export your form dataset in RAW format and upgrade the ConfiForms to (at least) 2.0.9 and use recovery API to recover the data from the dataset. This will invoke the migration process once again, and in 2.0.9+ version of ConfiForms it has an improved logic for migrating auto-number fields
Please try this in the TEST server (or on a test form) first to avoid any data loss, especially when you work with Recovery APIs.