You are here: Function Reference > Alphabetical Listing > H > HaveForm

HaveForm

Use this function to determine if a given form is contained in the document.

Syntax

HaveForm (Form, Group)

Parameter

Description

Form

Enter the name of a form. The default is the current form.

Group

Enter the name of a group to contain the specified form. The default is the current group.

The system optionally returns one (1) if the form is located or zero (0) if it cannot be found.

Keep in mind you can use an asterisk (*) as the object name to match parent objects. This lets you find objects without explicitly knowing the parent names.

Note For optimal performance, avoid using wildcards (*) when searching for field, section, or form names.

Several of the DAL functions might return a value that may indicate a form is or is not a part of the document. However, those functions also intend to perform some other procedure other than searching for the form. This function simply identifies whether a given form is present in the form set.

The function does not require any parameters. However, calling it in this manner will typically return 1, since it will locate the current form.

Example

Here are some examples:

Function

Result

Explanation

HaveForm( "Form")

1 or 0

Attempts to locate the named form. If found, returns 1.

HaveForm( "Form\3", "GRP")

1 or 0

Locates the third occurrence of the file named Form within the specified group. If found, returns 1.

See also