Need to duplicate a form type for 2 new projects

Document ID : KB000109710
Last Modified Date : 03/08/2018
Show Technical Document Details
Introduction:
Users are creating 2 new projects and want to create new form types for the new projects that look the same as the original project, just with new form type names and new data tables.
Environment:
CA Harvest SCM all versions and platforms
Instructions:
To create a new form type that duplicates an existing form type you will need 2 files - the original form's XML file and SQL file.

1. Make copies of the original form's XML file and SQL file, giving them the new form type name you are creating.

2. Edit the new form's SQL file, making the following changes:
   - In the INSERT INTO harformtype statement, in the VALUES clause, change the second item in the list to be the name of the new data table, and change the third item in the list to be the new form type name.
   - In the CREATE TABLE statement, change the name to be the new data table name
User-added image

3. Edit the new form's XML file making the following changes:
   - In the "<harvest_form" tag, change the values for "dbtable=" and "id=" to be the name of the new data table
   - In the "<harvest_form" tag, change the value for "name=" to be the new form type name
User-added image

After saving and closing both files, you can execute the SQL script according to the instructions in the Administrator Guide, then use hformsync to import the new form type's xml script.