4D v16.3FORM GET OBJECTS |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
FORM GET OBJECTS
FORM GET OBJECTS
The FORM GET OBJECTS command returns the list of all objects present in the current form in the form of (an) array(s). This list can be restricted to the current form page and can exclude objects of inherited forms. The command can be used with both input and output forms. If an array passed as a parameter is not previously declared, the command creates it and automatically sets its size. However, in the interest of compiling the application, we recommend that you explicitly declare each array. Pass the name of the string array that will contain object names (each object name is unique within a form) in objectsArray. The order in which objects appear in the array is not significant. The other arrays optionally filled by the command are synchronized with the first array. Pass the name of the pointer array that already contains pointers to variables or fields associated with objects in the optional variablesArray parameter. If an object does not have an associated variable, the pointer Nil is returned. If there is a “subform” type object, a pointer to the table of the subform is returned. The third array (optional), pagesArray, is filled with the form page numbers. Each line of this array contains the page number of the corresponding object. The optional * parameter allows you to reduce the list of objects returned to the current page of the form. When this parameter is passed, only objects of the current page, page 0 and inherited pages are returned by the command. In other words, all the objects present in the current page of the form (visible or not) are processed by the command. The optional formPageOption parameter allows you to specify the form part(s) from where you want to get objects. By default, if the formPageOption parameter is omitted (as well as the * parameter), objects from all pages, including inherited objects, are returned. To reduce the scope of the command, you can pass a value in formPageOption. You can pass one (or a combination) of the following constants, found in the "Form Objects (Access)" theme:
Compatibility note: Passing the * parameter is equivalent to passing Form current page+Form inherited. The syntax using the * parameter is now deprecated and should no longer be used. You want to get information on all pages including objects from the inherited form (if any): //open form Or: //loaded form You want to get information on the current page only, with page 0 of the loaded form and inherited form objects (if any): FORM LOAD("MyForm") You want to get information on all objects in the inherited form (if any). If there is no inherited form, arrays will be returned empty. FORM LOAD("MyForm") You want to get information on page 4 objects, including page 0 objects, but without inherited form objects (if any): FORM LOAD([Table1];"MyForm") You want to get information on objects on all pages, but without inherited form objects (if any): FORM LOAD([Table1];"MyForm")
See also
|
PROPERTIES
Product: 4D
HISTORY
Created: 4D 2004 ARTICLE USAGE
4D Language Reference ( 4D v16) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||