Class FileMaker_Command_Find

Description

Command class that finds records using the specified criteria.

Create this command with FileMaker::newFindCommand().

Located in /FileMaker/Command/Find.php (line 29)

FileMaker_Command
   |
   --FileMaker_Command_Find
Direct descendents
Class Description
FileMaker_Command_FindAll Command class that finds all records from a layout.
FileMaker_Command_FindAny Command class that finds one random record.
Method Summary
void addFindCriterion (string $fieldname, string $testvalue)
void addSortRule (string $fieldname, integer $precedence, [mixed $order = null])
void clearSortRules ()
array getRange ()
void setLogicalOperator (integer $operator)
void setRange ([integer $skip = 0], [integer $max = null])
void setRelatedSetsFilters (string $relatedsetsfilter, [string $relatedsetsmax = null])
Methods
addFindCriterion (line 58)

Adds a criterion to this Find command.

void addFindCriterion (string $fieldname, string $testvalue)
  • string $fieldname: Name of the field being tested.
  • string $testvalue: Value of field to test against.
addSortRule (line 84)

Adds a sorting rule to this 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.
clearFindCriteria (line 66)

Clears all existing criteria from this Find command.

void clearFindCriteria ()
clearSortRules (line 92)

Clears all existing sorting rules from this Find command.

void clearSortRules ()
getRange (line 131)

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 177)

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 ()
setLogicalOperator (line 106)

Specifies how the find criteria in this Find command are combined as either a logical AND or OR search.

If not specified, the default is a logical AND.

void setLogicalOperator (integer $operator)
  • integer $operator: Specify the FILEMAKER_FIND_AND or FILEMAKER_FIND_OR constant.
setRange (line 118)

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

void setRange (integer $skip, [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 163)

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

The filter limits the number of related records returned by respecting the settings specified in the FileMaker Pro Portal Setup dialog box.

void setRelatedSetsFilters (string $relatedsetsfilter, [string $relatedsetsmax = null])
  • string $relatedsetsfilter: Specify one of these values to control filtering:
    • 'layout': Apply the settings specified in the FileMaker Pro Portal Setup dialog box. The records are sorted based on the sort defined in the Portal Setup dialog box, with the record set filtered to start with the specified "Initial row."
    • 'none': Return all related records in the portal without filtering or presorting them.
  • string $relatedsetsmax: If the "Show vertical scroll bar" setting is enabled in the Portal Setup dialog box, specify one of these values:
    • an integer value: Return this maximum number of related records after the initial record.
    • 'all': Return all of the related records in the portal. If "Show vertical scroll bar" is disabled, the Portal Setup dialog box's "Number of rows" setting determines the maximum number of related 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 Tue, 22 May 2007 13:39:06 -0700 by phpDocumentor 1.3.1