Locating Objects

Many of the graphics, section (image), page, have, WIP, and name functions support parameters that let you locate an object anywhere within the form set. The object hierarchy supported is explained below. This explanation also agrees with the field parameters discussed in Locating Fields.

item -> Section -> Form -> Group

A number of different object types are supported by sections. Three objects that can be located on a section are fields, graphics, and recipients. For information about fields, see Locating Fields. Fields, graphics, and recipients are all objects that belong or are defined on a section.

Sections occur on forms. Forms are defined within a form group (commonly referred to as a Line Of Business). The form groups are specified by the user during form set selection.

To locate a specific object within the document often requires one or more parameter names. For instance, to locate a specific field, in addition to the field’s name, might require the section name, form name, and/or group name. Similarly, a function used to locate a specific form, in addition to the form’s name, lets you specify the group to which it belongs.

In addition to an object’s name, most parameters will support an optional occurrence count to further identify the precise location of the object being requested.

Typically children of a section are unique to that section. However, that same object name might also be used on any number of other sections. Further, there may be any number of occurrences of a section on a given form. Likewise, there may be additional copies of a form included in the form set. And finally, any two forms might share one or more sections in common.

Since you can have any number of a similar named objects within a form set, the occurrence count, used with the object’s name, is sometimes necessary to identify a specific object. The following table explains many of the variations that are valid when locating form set objects.

Item Name

Section Name

Form Name

Group Name

Description

"ITEM"

*omitted*

*omitted*

*omitted*

Find the object on the current section.

"ITEM"

"IMG"

*omitted*

*omitted*

Find the first occurrence of IMG (a section) on the current form. If located, find ITEM on that section.

"ITEM"

*omitted*

"FRM"

*omitted*

Find the first occurrence of FRM (a form) in the current group. If located, find the first occurrence of ITEM on that form. The item may occur on any section on FRM since that parameter was omitted.

"ITEM"

*omitted*

*omitted*

"GRP"

Find the first occurrence of ITEM within the group, GRP. This item may be on any section on any form within that group.

"ITEM"

"IMG"

"FRM"

*omitted*

Find the first occurrence of FRM in the current group. Find the first occurrence of IMG on that form. Find ITEM on that section.

"ITEM"

"IMG"

*omitted"

"GRP"

Find the first occurrence of IMG within the group, GRP. This section may occur on any form since that parameter was not specified. Then find ITEM on that section.

"ITEM"

"IMG"

"FRM"

"GRP"

Find the first occurrence of FRM within the group, GRP. Then find the first occurrence of IMG. Finally, find ITEM on that section.

Locating Sections

 

"IMG"

*omitted*

*omitted*

Find the occurrence of the section on the current form.

 

"IMG"

"FRM"

*omitted*

Find the occurrence of the section on the form named. The form is assumed to be in the current group.

 

"IMG"

*omitted*

"GRP"

Locate the section within the named group.

 

"IMG"

"FRM"

"GRP"

Locate the form in the specified group. Then locate the section on that form.

Locating Forms

 

 

"FRM"

*omitted*

Locate the form within the current group.

 

 

"FRM"

"GRP"

Locate the form in the specified group.

Locating Groups

 

 

 

 

 

 

"GRP"

Locate the specified group.

In the previous table, ITEM refers to the name of an object type expected by the function. In other words, if the function is used to reference fields, you cannot locate the object if you give it the name of any other object type.

Many of these descriptions referred to the first occurrence of a particular object. This is the default search method unless an occurrence count is specified on the object name. For instance, if there are three occurrences of a given object on a particular form, you would distinguish them as ITEM\1, ITEM\2, and ITEM\3. (In practice, you do not have to specify \1 to identify the first occurrence except with those functions that match on partial names.)

A backslash (\) is not a valid character in any object name. When found, the object functions assume that the number following the backslash identifies the particular occurrence of that named object you are requesting. Group names do not require an occurrence number because form groups are unique within the form set. The following table demonstrates several uses of occurrence indicators.

Item Name

Section Name

Form Name

Group Name

Description

"ITEM"

"IMG\2"

*omitted*

*omitted*

Find the second occurrence of IMG (a section) on the current form. If located, find ITEM on that section.

"ITEM\3"

*omitted*

"FRM\2"

*omitted*

Find the second occurrence of FRM (a form) in the current group. If located, find the third occurrence of ITEM on that form.

"ITEM"

"IMG\5"

*omitted*

"GRP"

Find the fifth occurrence of IMG (a section) within the group, GRP. If located, find ITEM on that section.

Finally, if a named object, or occurrence of that object, cannot be located the search ends in failure. For instance, if in the last example there are not five occurrences of IMG within the named group, then the function stops looking for the item and returns without success.

See Also