2 Replies Latest reply on Mar 3, 2016 10:05 AM by ArturoIacobelli

    PHP FileMaker Compound Find Error

    ArturoIacobelli

      I believe I found an error in this compound find command.

       

      $compoundFind = $fm->newCompoundFindCommand('PHPListings');

        $findCommand = array();

        $left1 = 450;

        for($counter = 0; $counter < ($arraypermissionscount + 1); $counter++)

        {

            $findCommand[] = $fm->newFindCommand('PHPListings');

            $findCommand[$counter]->addFindCriterion('Type', '=='. 'Agreement');

            $findCommand[$counter]->addFindCriterion('DocumentLevelNoSpaces', '='. $arraypermissions[$counter]);

            if(isset($searchparameter))

            {

                 $findCommand[$counter]->addFindCriterion('PHPSearch', $searchparameter);

            }

            $compoundFind->add(($counter + 1), $findCommand[$counter]);

        }

        $result = $compoundFind->execute();

       

      I get this back on my web browser.

       

      PHP Notice: Undefined property: FileMaker_Command_Find_Implementation::$_omit in C:\Program Files\FileMaker\FileMaker Server\Web Publishing\publishing-engine\php\FileMaker\Implementation\Command\CompoundFindImpl.php on line 54

        • 1. Re: PHP FileMaker Compound Find Error
          ArturoIacobelli

          So no one has to both understanding what the variables are,,,,

           

          $compoundFind = $fm->newCompoundFindCommand('PHPListings');

          $findrequest1 = $fm->newFindCommand('PHPListings');

          $findrequest1->addFindCriterion('Type', '=='. 'Agreement');

          $findrequest1->addFindCriterion('DocumentLevelNoSpaces', '='. "Building1");

          $findrequest2 = $fm->newFindCommand('PHPListings');

          $findrequest2->addFindCriterion('Type', '=='. 'Agreement');

          $findrequest2->addFindCriterion('DocumentLevelNoSpaces', '='. "Building2");

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

          $compoundFind->add(2, $findrequest2);

          $result = $compoundFind->execute();

           

          generates the same error.

           

          PHP Notice: Undefined property: FileMaker_Command_Find_Implementation::$_omit in C:\Program Files\FileMaker\FileMaker Server\Web Publishing\publishing-engine\php\FileMaker\Implementation\Command\CompoundFindImpl.php on line 54

          • 2. Re: PHP FileMaker Compound Find Error
            ArturoIacobelli

            Figured it out. you must use newFindRequest() instead of newFindCommand()