WhatSection

WhatImage

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

Use this function to return the name of the section that includes the item you searched for. Having the name of the form lets you manipulate that object using other DAL functions, which may require its name.

Syntax

WhatSection (Field, Section, Form, Group)

Parameter

Description

Field

Enter the name of the field. The default is the current field.

Section

Enter the name of the section. The default is the current section.

Form

Enter the name of the 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.

If nothing matches your criteria, the system returns a blank.

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, minimize the use of wildcards (*) when searching for field, section, or form names.

Example

Here is an example:

Function

Result

Explanation

section = WhatSection("Total Field\12", , ,"*");

The name of the form or 0

Attempts to locate the twelfth occurrence of a field in a form set and returns the name of the section that contains that field.

See also