Use this function to determine if a specified field can be located.
HaveField (Field, Section, Form, Group)
Parameter |
Description |
Field |
Enter the name of a field. The default is the current field. |
Section |
Enter the name of a section that contains the field named. The default is the current section. |
Form |
Enter the name of a form that contains the section and/or field named. The default is the current form. |
Group |
Enter the name of the form group that contains the form, section, and/or field named. The default is the current group. |
The system optionally returns one (1) on success or zero (0) on failure.
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. For instance, if you enter
HaveField("FIELD", , "*" )
The system will find the field named FIELD on any form within the current group. This works because the asterisk in the form name position indicates that any form will do.
Note | For optimal performance, avoid using wildcards (*) when searching for field, section, or form names. |
The system searches for the specified field on a particular section, form, and/or group. If the field is located, one (1) is returned. Otherwise, zero (0) is returned.
Although the return value from some of the other field’s functions might be used to determine the availability of a certain field, this function merely locates the field and does not change or query any particular information about the field.
Here are some examples:
Function |
Result |
Explanation |
Return(HaveField( ) ) |
1 |
If this script is associated with an entry field, it will always return one (1) if no parameters are provided. |
Return(HaveField ( "Second")) |
1 or 0 |
the current section will be searched for the field. A one (1) is returned if located. |
Return(HaveField ( "Third", , "FRM")) |
1 or 0 |
Locate the form specified within the current form group. Then locate Third anywhere on that form. If found, a one (1) is returned. |
© Copyright 2014, Oracle and/or its affiliates. All rights reserved. Legal notices.