13 Replies Latest reply on Mar 12, 2015 4:45 AM by Fred(CH)

    Count function on repeating global field from a related table

    gcatnine

      Summary

      Count function on repeating global field from a related table

      Product

      FileMaker Pro

      Version

      13v5 Pro and ProAdvance

      Operating system version

      Windows 7 SP1

      Description of the issue

      the "Count" function applied to a repeating field with a global definition, when it is done from a related table, it returns the number of not empty field multiplied by the number of related records. i.e.:
      TableA::GlobalField with 4 repetitions - 2 of each are empty

      TableA is related to TableB

      From TableB there are 3 related TableA records

      Being in a TableB layout the Count(TableA::GlobalField) returns 6 (2 rep field times 3 records)

      Being a global field I'm expecting to get as result 2 (number of not empty rep fields)

      Steps to reproduce the problem

      Create a global field ia a TableA with some repetitions
      Relate TableA with TableB (any relationship)
      Create 2 + records in TableA
      Fill the global field with some values (not need to fill all repetitions)
      go to TableB layout
      Using the Data Viewer or creating a script do the calculation: Count (TableA::Global_field)
      It will returns the number of not empty repeating field timed the number of related records

      Expected result

      The Count function applied to a global field must, from a related table, return the number of not empty repeating fields

      Actual result

      The Count function applied to a global field from a related table returns the number of not empty repeating field times the number of related records

      Exact text of any error message(s) that appear

      NA

      Configuration information

      NA

      Workaround

      go to a layout of the related table (TableA) memorize the count (that is correct), go back to the previous layout (TableB)