AnsweredAssumed Answered

FM php default find behaviour

Question asked by pdh on Aug 23, 2010
Latest reply on Dec 1, 2011 by ccrumley


FM php default find behaviour

Your post

Can somebody tell me how a hange the default find behaviour when using php and FM server. If I create a find page using the wizard when a user clicks find without entering any find criteria onthe page Filemaker returns all the records in the database. What I want it to do is to fail to find anything. I'm guessing it can be changed in this part of the code but I don't know what to change t to.

 switch ($action) {
        case "find": {
        // clear the recid

        // create a find command
           $findCommand = $fm->newFindCommand($layoutName);

        // get the posted record data from the findrecords page
           $findrequestdata = $cgi->get('storedfindrequest');
           if (isset($findrequestdata)) {
               $findCom = prepareFindRequest($findrequestdata, $findCommand, $cgi);

            // set the logical operator
               $logicalOperator = $cgi->get('-lop');
               if (isset($logicalOperator)) {
           } else
               $findCom = $fm->newFindAllCommand($layoutName);
        default: {
           $findCom = & $fm->newFindAllCommand($layoutName);

It looks like the default is a find all

$findCom = $fm->newFindAllCommand($layoutName);

is there a similar command to say find none ?

regards paul.