0 Replies Latest reply on Nov 20, 2014 6:57 AM by fmbug

    Urgent Help Needed: Some Technical issues in FileMaker PHP

    fmbug

      Hi All,

       

      I stuck with some technical issue with FileMaker PHP application.

       

      Product: FileMaker Server 13 v13.0.4.400

       

      Number of Files Hosted: 28

       

      PHP Version: v5.3.27

       

      I am using ExecuteSQL function to pull the data from FileMaker side with PHP.

       

      Following are the issues:

       

      1. Self-Join Issue with some specific types of data types.

      Self join is not working with Calculated fields. As of now data can be pulled using other datatypes like Number, Text etc.

       

      FileMaker Script which we are using:

      Set Field By Name ["FMWeFrame::Result_Data" ; Evaluate ( GetValue ( $$web_script_param ; 7 ) )]

       

      PHP Script which we are using:

      $query_fields = array('emp_id', 'empname', 'global_year', 'global_dept', 'global_section');

      $query = "SELECT m.firstname AS 'Manager', e.firstname AS 'Direct report' FROM employees e INNER JOIN employees m ON m.employeeNumber = e.reportsto WHERE Project_Year = ? AND Project_DeptID = ? OFFSET 0 ROWS FETCH FIRST 25 ROWS ONLY";

      $expression = "ExecuteSQL ( "" . $query . ""; "[[[COL]]]" ; "[[[ROW]]]" ; "2014" ; "nDEPTID" ; "2" ; "1" )";

      //Parameter 7 is for expression in which we are passing the query through ExecuteSQL function.

       

      2. Sorting issue with join.

      PHP Script which we are using:

      $query = "SELECT m.firstname AS 'Manager', e.firstname AS 'Direct report' FROM employees e INNER JOIN employees m ON m.employeeNumber = e.reportsto WHERE Project_Year = ? AND Project_DeptID = ? ORDER BY manager OFFSET 0 ROWS FETCH FIRST 25 ROWS ONLY";

       

      3. Sorting issue with layout concept.

      Whenever we call the AddSortRule function it will show Error:22 code. (Communication Error).

       

       

      Note: Join is possible with Number fields like id etc. But whenever we try to create relations on Calculation fields. It is displaying Error:22. And Sometimes it also disables the PHP Services on FileMaker Server.

       

       

      Your quick response will be appreciable.

       

      Thanks...