3 Replies Latest reply on Mar 27, 2015 7:34 AM by echocron

    Difficulty Implementing Container Bridge


      I've been trying to get Container Bridge working with my solution and I'm stuck - I just get a blank.


      I've been able to get the Questionnaire database example working on the same sever and I've compared everything but cannot find a difference. Some points - I've created a user that has the same extended privileges as the Questionnaire user, I've modified the Container Bridge script to support application/PDF mime types. I've even loaded the same PDF file to both databases - works in the tutorial, not in mine. Obviously there is something missing from my solution but I can't guess what. Below is the code used to get the data from the view. The ID used to search is passed from another page and used to find the matching record. I'm finding the correct record but not displaying the PDF.


      Any help is appreciated

        //create the find command and specify the layout
              $findCommand = $fm->newFindCommand('CMPortal - View485');
        //Specify the field and value to match against.
        $findCommand->addFindCriterion('POCID', $_GET['ID']);
              //Perform the find
              $result = $findCommand->execute();
               //Check for an error
               if (FileMaker::isError($result)) {
                echo"<p><strong>An error occurred.</strong></p><p>You do not have sufficient privileges to view this content. Please contact a system administrator at (248) 299-0030.</p>";
         //Debug Message
         echo "<p>Error: " . $result->getMessage() . "</p>";
                  //Store the matching record
                  $records = $result->getRecords();
                  $record = $records[0];
         $POCID = $record->getField ('POCID');
         $CreatedBy = $record->getField ('CreatedBy');
         $Document = $record->getField ('Document');
                  //Display the results
         foreach ($records as $record){
         echo '<p>'.$POCID.'</p>';
         echo '<p>'.$CreatedBy.'</p>';
         echo '<p><embed src="ContainerBridge.php?path=' . urlencode($Document) . '" width="600" height="500"></p>';