AnsweredAssumed Answered

[PHP API] setOmit(true) does not seem to work

Question asked by haike00 on Apr 12, 2012

Title

[PHP API] setOmit(true) does not seem to work

Your post

I am trying to get a set of results from a table using the setOmit() function.

Somehow, I am unable to retrieve the records I want.

Can anybody tell me what is wrong with my code?

 

Server Details

FileMaker Server Advanced 11 (11.0.2.217)

PHP API (1.1)

 

Sample TABLE

COLUMN ACOLUMN B
A B
C D

 

Sample CODE

$fm = new FileMaker($database, $hostspec, $username, $password);

 

$findRequest = $fm->newFindRequest($layout);

$findRequest->clearFindCriteria();

$findRequest->addFindCriterion('COLUMN B', '==D');

$findRequest->setOmit(true);

 

$compoundFind = $fm->newCompoundFindCommand($layout);

$compoundFind->add(1, $findRequest);

$result = $compoundFind->execute();

 

if(FileMaker::isError($result)){

echo $result->getMessage();

}

else{

$records = $result->getRecords();

foreach($records as $record){

$fields = $record->getFields();

foreach($fields as $field){

echo $field . ' >> ' . $record->getField($field) . '<br />';

}

}

}

Outcomes