6 Replies Latest reply on Feb 8, 2016 11:48 AM by dreygo

    Pattern Count Error

    dreygo

      Filemaker 13/14

      Mac OS 10.9.5

      MacPro 5,1

       

      I use a global variable array to populate a chart. Because of this I have noticed that when I do a return count I am getting inaccurate results, These results do not become inaccurate until I navigate to a layout where a chart resides that relies on the variable data.

       

      Please open my demo file named "bugsy" for a quick understanding, but the basics are:

       

      Populate a global text field with an array

      Set variable using the information from the global field

        ***at this point if you PatternCount the returns in the variable you will get a correct result

      Navigate to a layout which has a chart element that relies on the variable and the array contained therein to display

        ***at this point the return count goes to zero, even though the chart displays correctly

       

      NOTE: There are no inaccuracies when opening this file in FMP12(or 11 for that matter).

       

      WORKAROUNDS:

      Use the global FIELD for charting instead of VARIABLE

      Use Filemaker 12

       

      The main reason this is an issue for me (and my guess for others as well) is that pattern counting returns allows a quick reference to the number of values in an array. By substituting the return with a plus sign, one could easily create a custom function that summarizes an array contained this way. I will admit that even with workarounds, I can't stand seeing a zero pattern count of returns when viewing an array. Luckily for me, it only broke my solutions in a couple of places, and the workaround was not an onerous one.

        • 1. Re: Pattern Count Error
          TSGal

          dreygo:

           

          Thank you for your post.

           

          I am able to replicate the issue.  The "¶" return characters (ASCII-13) change to ASCII-10 (line feed) characters once the current script has finished.  This is why the PatternCount function fails for "¶", and why it will still work as an array.  I have forwarded your post to our Development and Testing departments for review.  When I receive any feedback, I will let you know.

           

          As a workaround, use:    PatternCount ( $$globalVariable ; Char (10) )

           

          TSGal

          FileMaker, Inc.

          • 2. Re: Pattern Count Error
            Malcolm

            TSGal,

             

            The pilcrow (ASCII 182) is a symbol representing a paragraph. But what

            is a paragraph? That depends on the operating system, doesn't it.  And

            because of this inherent ambiguity the pilcrow has been used within

            FileMaker Pro to provide semantic equivalence between different computer

            platforms which use different encoding to generate a paragraph.

             

            The paragraph is of particular importance in FileMaker programming

            because it represents an item in a list. The pilcrow should be the

            standard definition of a record delimiter in a list.

             

            Shouldn't we be able to use the pilcrow in that way, that is, we should

            be able to use it to represent a paragraph, which may be CR, LF or CRLF?

             

            And if the programming team chooses to use LF behind the scenes,

            shouldn't we be able ignore the gory details and use the pilcrow?

             

            Malcolm

            • 3. Re: Pattern Count Error
              dreygo

              Thanks for the workaround suggestion TSGal. If I have some guys still using FMP12 on our network should I go with:

               

              ( PatternCount ( $$globalVariable ; Char (10) ) )  +  ( PatternCount ( $$globalVariable ; Char (13) ) )

              • 4. Re: Pattern Count Error
                TSGal

                dreygo:

                 

                Your workaround works under Mac OS X 10.11.3, Windows 7, and iOS 9.2.1.

                 

                TSGal

                FileMaker, Inc.

                • 5. Re: Pattern Count Error
                  TSGal

                  dreygo:

                   

                  Testing is able to replicate the issue.  The information has been sent to Development for further review.

                   

                  TSGal

                  FileMaker, Inc.

                  • 6. Re: Pattern Count Error
                    dreygo

                    You are all over it TSGal. Thanks for the quick replies.