You are here: Function Reference > Alphabetical Listing > I > SectionName

SectionName

ImageName

ImageName has been replaced with SectionName. ImageName and SectionName have same functionality; the only change is to the function name. The existing ImageName scripts will continue to function and will not require any modification.

Use this function to get the name of a section. This name is returned.

Syntax

SectionName (Count, Startsection, Form, Group)

Parameter

Description

Count

Enter an index reference to locate a form before or after the specified form. The default is zero (0).

Startsection

Enter the name of a section from which to begin the search. The default is the current section.

Form

Enter the name of a form containing the requested section. The default is the current form.

Group

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

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.

The system returns the name of a section relative to another section on the same form. If no parameters are provided to this function, the current section’s name is returned. The Count parameter tells the system to move a number of sections forwards or backwards (negative) from a located section before returning the section name.

If the starting section cannot be located or the Count parameter causes the system to move beyond the number of sections contained on the form, the system returns an empty string.

If there is more than one copy of a section on the located form, the name returned will contain the occurrence notation used by DAL functions to locate sections. For instance, a name like IMG\2 identifies the second copy of IMG on a particular form.

Example

Here are some examples:

(Assume the current section is named IMG.)

Function

Result

Explanation

SectionName( )

IMG

No parameters will result in returning the current section name.

SectionName( 2, "IMG", "FormC")

 

Locate FORMC in the current group. Next, locate IMG on that form. Then, return the name of the section two positions beyond the located section.

See also