objectinfoarray(
FORMULA
,
QUERY
,
SEPARATOR
)

The objectinfoarray( function builds a text array of form object properties


Parameters

This function has three parameters:

formula – is the formula that will be used to extract the properties of the objects on a form and store them in an array. The entire formula must be enclosed in quotes (see Quotes). The formula normally contains one or more objectinfo( functions to extract properties from the objects. If the formula results in empty text ("") for an object then no element is added to the array for that object.

query – is a true/false formula used to determine which objects should be included in the output array. The entire formula must be enclosed in quotes (see Quotes). The formula normally contains one or more comparisons using the objectinfo( function to extract properties from the objects. Note: This parameter is optional, if it is omitted then all form objects will be included in the output array.

separator – is the separator character to be used in between each array element. Note: This parameter is optional, if it is omitted then carriage returns will be used as separators.


Description

This function creates a Text Array by scanning objects in a form. In its simplest form, it has one parameter which is a formula that determines what properties of the form should be included in the array, and in what format. This example generates an array with one line per object, with each line containing the object type and its location and size.

objectinfoarray({objectinfo("class")+": "+
    rectanglesizestr(objectinfo("rectangle"))})

The output of this example will look something like this:

PushButtonObject: 13,87,26,73
PushButtonObject: 13,506,26,152
RectangleShapeObject: 48,18,622,638
PushButtonObject: 13,20,26,58
ImageDisplayObject: 901,1081,20,72
ImageDisplayObject: 857,1055,32,88
TextDisplayObject: 131,701,17,69
TextEditorObject: 130,771,19,39
StepperButtonObject: 130,812,19,18
SliderButtonObject: 126,830,26,95

If you want the output array to include only a subset of the objects in the form, add a second formula that specifies which objects should be included, like this:

objectinfoarray({objectinfo("name")},{objectinfo("name")<>""})

This example will list all of the named objects in the form (see Object Names), like this:

LeftSideBorder
CenterBorder
RightSideBorder
PhotoMatrix

The Text Array produced by this function normally has each element separated by a carriage return, but you can change that by adding a third parameter. This example is identical to the previous one except for the fact that the names will be separated by commas.

objectinfoarray({objectinfo("name")},{objectinfo("name")<>""},",")

Here is typical output from this example:

LeftSideBorder,CenterBorder,RightSideBorder,PhotoMatrix

See Also


History

VersionStatusNotes
10.0NewNew in this version.