0 Replies Latest reply on Apr 12, 2013 5:44 PM by rhythmos

    Related data in remote file (on remote server) not visible to WPE (FMSA 11)

    rhythmos

      Summary

      Related data in remote file (on remote server) not visible to WPE (FMSA 11)

      Product

      FileMaker Server

      Version

      FMSA 11

      Operating system version

      Windows 2008 R2 Standard

      Description of the issue

      Using PHP (either FX or Filemaker API), neither field name nor field values are returned by PHP from a related field placed on a layout referenced by PHP. Related field is in an external file, and hosted on a remote Filemaker Server on the same subnet.

      Both files use same login account with same extended privileges. Results are no better if using a [Full Access] account in both files, with all extended privileges enabled.

      I did notice that when trying to access related data in an external file on the *same* server (as the local file being queried by PHP/WPE), that the same issue came up -- until I chnaged the entry for the external file in External Data Sources to the relative style ("file:child") rather than the FM network protocol ("fmnet:/172.16.0.100/child"), which was very counter-intuitive.

      Given that the "file:child" construction is the only one that works for WPE for external files, it's not surprising that there's no way to enter an External File Reference for a file on a remote server that WPE will be able to make use of. But it's not clear to me if this is a deliberate limitation, or a bug.

      Thanks!

      Steps to reproduce the problem

      - Set up two Filemaker 11 Server Advanced installations, as one-machine deployments. (Refer to one as the "local" machine and the other as the "remote" machine.)
      - on the Local machine, host a file called "Parent" with a single table, "parent".
      - on the Remote machine, host a file called "Child" with a single table, "child".
      - create duplicate web access accounts on in each file, with the same name, pwd, and extended privileges (enable XML, PHP, and App); give the accounts View, Edit, and Create privileges (all fields) in the lone table in each file
      - create a table instance of "child" within "parent"
      - create a simple relationship between the two (pk <-> fk)
      - create a simple layout in "parent" with a few basic fields
      - add a single related field (no portal) onto the layout that shows data from the "child" table; related data should be visible while viewing with a desktop client
      - create a simple web form that allows the user to create a new record in "parent" and make sure a primary key value is entered such that there will be a matching record in "child" (i.e., so that the related field will have valid data upon record creation).
      - return results to web user via a print_r statement to show all field names & values on the referenced layout in the newly created record.

      Expected result

      An array of field names and real values.

      Actual result

      An array of field names and real values for all local fields, but neither field names nor real values for the related remote table. An example is below.

      Using FX - print_r():

                  [ID_Account] => Array
                      (
                          [0] => 0000000163
                      )
                  [test_intrafile::ID_Account] => Array
                      (
                          [0] => 0000000163
                      )

                  [test_extrafile::ID_Account] => Array
                      (
                          [0] => 0000000163
                      )

                  [] => Array
                      (
                      )

                  /* last object *should* have shown:

                  [test_remotefile::ID_Account] => Array
                      (
                          [0] => 0000000163
                      )
                  */

      Analogously, in FM API for PHP, one gets:

                                          [test_intrafile::id_n] => FileMaker_Field Object
                                              (
                                                  [_impl] => FileMaker_Field_Implementation Object
                                                      (
                                                          [_layout] => FileMaker_Layout Object
      *RECURSION*
                                                          [_name] => test_intrafile::id_n
                                                          [_autoEntered] => 1
                                                          [_global] =>
                                                          [_maxRepeat] => 1
                                                          [_validationMask] => 0
                                                          [_validationRules] => Array
                                                              (
                                                              )

                                                          [_result] => number
                                                          [_type] => normal
                                                          [_valueList] =>
                                                          [_styleType] =>
                                                          [_maxCharacters] => 0
                                                      )

                                              )

                                          [test_extrafile::id_n] => FileMaker_Field Object
                                              (
                                                  [_impl] => FileMaker_Field_Implementation Object
                                                      (
                                                          [_layout] => FileMaker_Layout Object
      *RECURSION*
                                                          [_name] => test_extrafile::id_n
                                                          [_autoEntered] => 1
                                                          [_global] =>
                                                          [_maxRepeat] => 1
                                                          [_validationMask] => 0
                                                          [_validationRules] => Array
                                                              (
                                                              )

                                                          [_result] => number
                                                          [_type] => normal
                                                          [_valueList] =>
                                                          [_styleType] =>
                                                          [_maxCharacters] => 0
                                                      )

                                              )

                                          [] => FileMaker_Field Object
                                              (
                                                  [_impl] => FileMaker_Field_Implementation Object
                                                      (
                                                          [_layout] => FileMaker_Layout Object
      *RECURSION*
                                                          [_name] =>
                                                          [_autoEntered] =>
                                                          [_global] =>
                                                          [_maxRepeat] => 1
                                                          [_validationMask] => 0
                                                          [_validationRules] => Array
                                                              (
                                                              )

                                                          [_result] => unknown
                                                          [_type] => unknown
                                                          [_valueList] =>
                                                          [_styleType] =>
                                                          [_maxCharacters] => 0
                                                      )

                                              )

      Exact text of any error message(s) that appear

      No errors are returned...!

      Workaround

      Will have to query external file on external server directly via PHP, but this means I cannot make user of relationships between the files (even in scripts), so it's much more tedious, and limiting.