KeepAllFormData()

Form object

Call KeepAllFormData to retain all form data and field images when you switch form definition types using the SetName method.

Warnings
  • Use KeepAllFormData only when switching between two form definitions that are identical except for their name. If the two form definitions are not identical, data will probably be destroyed.

  • Ensure that the UnidentCopyValues setting in Ehlocal.ini is set to 1.

  • Call KeepAllFormData before SetName.

  • Call KeepAllFormData each time you are about to call SetName.

Background

The SetName method can be used to change which form definition a form is associated with. If you call SetName when the UnidentCopyValues setting in Ehlocal.ini is set to 1, all filled-in fields with the same name in both form definitions are preserved. However, fields that are not filled in or are not found in the new form definition are discarded, and field images are also discarded. Call KeepAllFormData to prevent this loss.

The Form object

UnidentCopyValues (FORMS INI File Help topic)