4. System Classes : FrameExec Class : FieldByName Method
 
Share this page                  
FieldByName Method
The FieldByName method finds a field object that matches the specified name.
This method has the following syntax:
fieldobject = FrameExec.FieldByName(name = varchar(256))
This method checks through all the fields contained in the FrameExec's (executing frame's) form (TopForm attribute), mainbars (MainbarTop, MainBarBottom, MainBarLeft and MainBarRight attributes) and main menu (StartMenu attribute) to find a field object with a name whose full name matches the name you specify. You must specify the name parameter without dot notation; FieldByName will not find fields with named ancestors. If the method does not find a field with a matching name, it returns NULL.
To find the field objects for named fields that are descendants of named composite fields or menu groups (and thus have full names that contain one or more dots), use either the FieldByName or the FieldByFullName method defined for the CompositeField class or MenuGroup class. To find the field objects for unnamed form fields, use the FieldsByProperty method defined for the CompositeField class.