0 Replies Latest reply on Oct 4, 2012 2:21 AM by klein

    Bad found set when performing find on a remote db using relationship with global variable

    klein

      Summary

      Bad found set when performing find on a remote db using relationship with global variable

      Product

      FileMaker Pro

      Version

      Advanced 11v3

      Operating system version

      Win XP SP3

      Description of the issue

      Given:
      ------

      table TabA with fields
      TabA::a, number field
      TabA::gB, global number field

      and

      table TabB with fields
      TabB::a, number field
      TabB::b, number field
      TabB::c, number field

      and

      a multi-criteria relationship between them:
      tabA_tabB__a_gB (naming iaw anchor-buoy convention) with
      TabA::a = TabB::a and
      TabA::gB = TabB::b

      -------------------------

      Performing a find using this relationship will work fine, if the DB is local, but will often cause irreproducably wrong found sets, if the DB is hosted on a remote server (using FM Server 11 on Mac OS X 10.7).

      -------------------------
      Example:

      Set Field [TabA::gB, 1]
      Enter Find Mode []
      Set Field [TabA::a, 1]
      Set Field [tabA_tabB__a_gB::c, 2]
      Perform Find[]

      The resulting found set will very often be wrong, if the file is shared.

      ------------------------

      In the Filemaker online help, I found a document that partly treats this issue (http://help.filemaker.com/app/answers/detail/a_id/5895/~/working-with-global-fields). Yet, according to this document, I reckon, the search should work.

      Workaround

      Performing the find without the "global relationship" criteria and then iterate over the found set (Loop) omitting undesired records by evaluating the relationship in browse mode.

      Set Field [TabA::gB, 1]
      Enter Find Mode []
      Set Field [TabA::a, 1]
      //Set Field [tabA_tabB__a_gB::c, 2]
      Perform Find[]
      Go To Record [First]
      Loop
        If [tabA_tabB__a_gB::c != 2]
          Omit Record
        End If
        Go to Record [Next, Exit after last]
      End Loop