You are here: Function Reference > Alphabetical Listing > C > CopyForm

CopyForm

Use this procedure/function to locate a form and copy that form and its field contents (data) into a new form. With this procedure, you can also specify another form and group as the insertion point for the new form.

Note When you use the AddForm procedure, the only data duplicated is the global data that propagates into the fields. When you use the DupForm procedure, only those forms with the Multicopy option checked can be duplicated. With the CopyForm procedure, any form within the document can be copied.

Syntax

CopyForm (Form, Group, InsAtForm, InsAtGroup)

Parameter

Description

Form

Enter the name of the form you want to copy

Group

(Optional) Enter the name of the group if the form is not in the current group.

InsAtForm

Enter the name of the form after which you want the system to insert the form it copies.

InsAtGroup

(Optional) Enter the name of the group for the insertion point form, specified in the InsAtForm parameter if that form is not in the current group.

If you do not specify an insertion point, the system appends the new form to the end of the form group of the original form.

If the procedure is successful in copying the form, it returns a non-zero value, otherwise zero (0) is returned. This procedure can fail for these reasons:

You can use this procedure in scripts hosted by AFEMain or other Entry-related applications and also in batch applications using the GenData program.

See also