# Docs For Class FileMaker_Command_CompoundFind

## Class FileMaker_Command_CompoundFind

Description

Command class that performs multiple find requests, also known as a compound find set.

Requests are executed in the order specified in the add() method. The found set includes the results of the entire compound find request. Create this command with FileMaker::newCompoundFindCommand().

Located in /FileMaker/Command/CompoundFind.php (line 32)

    FileMaker_Command
       |
       --FileMaker_Command_CompoundFind

Method Summary
void add (int $precedence, findrequest $findrequest)
void addSortRule (string $fieldname, integer $precedence, [mixed $order = null])
void clearSortRules ()
array getRange ()
array getRelatedSetsFilters ()
void setRange ([integer $skip = 0], [integer $max = null])
void setRelatedSetsFilters (string $relatedsetsfilter, [string $relatedsetsmax = null])
Methods
add (line 63)

Adds a Find Request object to this Compound Find command.

void add (int $precedence, findrequest $findrequest)

- int $precedence: Priority in which the find requests are added to this compound find set.
- findrequest $findrequest: FileMaker_FindRequest object to add to this compound find set.

addSortRule (line 81)

Adds a sorting rule to this Compound Find command.

void addSortRule (string $fieldname, integer $precedence, [mixed $order = null])

- string $fieldname: Name of the field to sort by.
- integer $precedence: Integer from 1 to 9, inclusive. A value of 1 sorts records based on this sorting rule first, a value of 2 sorts records based on this sorting rule only when two or more records have the same value after the first sorting rule is applied, and so on.
- mixed $order: Direction of the sort. Specify the FILEMAKER_SORT_ASCEND constant, the FILEMAKER_SORT_DESCEND constant, or the name of a value list specified as a string.

clearSortRules (line 89)

Clears all existing sorting rules from this Compound Find command.

void clearSortRules ()
getRange (line 114)

Returns the current range settings.

- return: Associative array with two keys: 'skip' for the current skip setting, and 'max' for the current maximum number of records. If either key does not have a value, the returned value for that key is NULL.

array getRange ()
getRelatedSetsFilters (line 145)

Returns the current settings for the related records filter and the maximum number of related records to return.

- return: Associative array with two keys: 'relatedsetsfilter' for the portal filter setting, and 'relatedsetsmax' for the maximum number of records. If either key does not have a value, the returned for that key is NULL.

array getRelatedSetsFilters ()
setRange (line 101)

Sets a range to request only part of the result set.

void setRange ([integer $skip = 0], [integer $max = null])

- integer $skip: Number of records to skip past. Default is 0.
- integer $max: Maximum number of records to return. Default is all.

setRelatedSetsFilters (line 131)

Sets a filter to restrict the number of related records to return from a portal.

For more information, see the description for the FileMaker_Command_Find::setRelatedSetsFilters() method.

void setRelatedSetsFilters (string $relatedsetsfilter, [string $relatedsetsmax = null])

- string $relatedsetsfilter: Specify either 'layout' or 'none' to control filtering.
- string $relatedsetsmax: Maximum number of portal records to return.

#### Inherited Methods

Inherited From FileMaker_Command

> FileMaker_Command::execute()
> FileMaker_Command::setPreCommandScript()
> FileMaker_Command::setPreSortScript()
> FileMaker_Command::setRecordClass()
> FileMaker_Command::setRecordId()
> FileMaker_Command::setResultLayout()
> FileMaker_Command::setScript()
> FileMaker_Command::validate()

Documentation generated on Wed, 29 Jun 2011 12:31:21 -0700 by phpDocumentor 1.4.0