6 Replies Latest reply on May 18, 2010 1:38 PM by TSGal

    FileMaker 11 Self-Reference Global Auto-Enter fail

    JohnDuncan

      Summary

      FileMaker 11 Self-Reference Global Auto-Enter fail

      Description of the issue

      FileMaker Products InvolvedFileMaker Pro 11FileMaker Pro 11 Advanced Operating Systems InvolvedMacOS-X 10.5.8MacOS-X 10.6Windows XP Detailed description of the issue:A global text field with an auto-enter calculation (calculate always, calculate if all fields empty) fails to work on FileMaker 11 but works fine on FileMaker 9-10.  The field name is "FilterLocationGlob" and the auto-enter calculation is: If ( PatternCount ( Get ( CurrentPrivilegeSetName ) ; "TROY" ) > 0 ; "Troy" ; FilterLocationGlob ) In FileMaker 10 this produces the value "TROY" in the field if someone logs in with the TROY PrivilegeSet and if they log in with some other PrivilegeSet it leaves the global with its default value.  In FileMaker 11 however the VALUE of the calculation is: "If ( PatternCount ( Get ( PrivilegeSetName ) ; "BBDO" ) > 0 ; "Troy" ; FilterLocationGlob )" This shows up in the field contents in browse mode and in the data viewer.  Note that not only does it not produce the desired output but it displays a value that uses the FILEMAKER 10 designation of Get( PrivilegeSetName ) instead of Get( CurrentPrivilegeSetName ). Expected ResultThe field should show "Troy" or whatever was left in the global. Actual ResultThe field shows correctly on FileMaker 9 or 10 but shows the text of the calculation in FileMaker 11 Exact text of any error message(s) that appeared:N/A Any additional configuration information/troubleshooting that is relevant to the issue:The databases were created in FileMaker 7 and have been moved forward through 8, 8.5, 9, 10, and 11 Any workarounds that you have found:So far I have not found a workaround.  I've tried changing the global to a non-global and back.  Changing it to a numeric and back and de-hosting the databases and resetting the value of the global in single-user. 

        • 1. Re: FileMaker 11 Self-Reference Global Auto-Enter fail
          TSGal

          John Duncan:

           

          Thank you for your post.

           

          I am unable to replicate the problem.  This is what I have done.

           

          Using FileMaker Pro 10, I opened one of my test files (file1.fp7) that contains a few privilege sets.  I created "FilterLocationGlob" text field, made it Global storage, Set the auto-enter calculation for:

           

          If (PatterCount ( Get (PrivilegeSetName) ; "Full Access" ) > 0 ; "Admin" ; FilterLocationGlob )

           

          I chose this to calculate when empty and unchecked "Do not replace existing value of field".

           

          I originally logged in with Guest access, only to discover I can't enter information into the field.  Oops.  I then logged in again with limited access ("Limited" privilege set) and entered "TSGal".  No change.  I closed the file and reopened with Admin privileges, typed 123 and the field changed to "Admin" as expected.

           

          I closed the database file.

           

          I launched FileMaker Pro 11 and opened the file under the "Limited" password (and privilege set).  I entered TSGal into FilterLocationGlob and the value stayed at TSGal.  I closed the file, reopened under Admin privileges, and entered 123 into FilterLocationGlob.  When I exited the field, the value changed to "Admin" as expected.

           

          I went into Manage Database, and I the Auto-Enter Calculation has automatically changed to:

           

          If (PatternCount ( Get (CurrentPrivilegeSetName) ; "Full Access" ) > 0 ; "Admin" ; FilterLocationGlob )

           

          Get (PrivilegeSetName) exists in FileMaker Pro 10 but does not exist in FileMaker Pro 11, as it has been replaced with Get (CurrentPrivilegeSetName) and that doesn't exist in FileMaker Pro 10.

           

          Is there something else I should try?

           

          TSGal

          FileMaker, Inc.

          • 2. Re: FileMaker 11 Self-Reference Global Auto-Enter fail
            JohnDuncan

            I found the problem.  This was a complicated solution that I inherited so it took a while to track it down.  What was happening was that the text of the calculation was stored in the contents of a field in another table.  During the loading of the layout that code was passed through an Evaluate function to run the code stored in the field in the other table.  Because Get( PrivilegeSetName ) is not valid in FileMaker 11 the code was set up to put the content of the invalid expression into the field to draw attention to the error.  It certainly had that effect but since the code was replicated in the auto-enter I was focused on that instead of tracing the code that brought the layout up.

             

            Not a FileMaker 11 bug, but one of those "Gotcha"s of using the Evaluate function.

            • 3. Re: FileMaker 11 Self-Reference Global Auto-Enter fail
              timcimbura

              I've seen this issue with other global auto enter calculations that fail to evaluate. I was forced to create a script that updates the global values when triggered by a change in another global. Seems like a bug.

              • 4. Re: FileMaker 11 Self-Reference Global Auto-Enter fail
                TSGal

                timcimbura:

                 

                Thank you for your post.

                 

                If you have an example that I can duplicate, please let me know, and I'll make sure it gets reported.

                 

                TSGal

                FileMaker, Inc.

                • 5. Re: FileMaker 11 Self-Reference Global Auto-Enter fail
                  carlsson_1

                  We also have this problem at one of our clients. Unfortuntely it's intermittent and I cannot reproduce the error.

                   

                  It started after upgrading some clients to FM 11.

                   

                  We have a "System" table that contains Global Calculations, that are supposed to be used throughout the system. Suddenly the values from these vanished. Duplicate  a record created all values again, but they vanish over time (we have some jobs that runs during the nights).

                   

                  Server is Windows 2003 with FM server v10, and clients are both Mac's and PC's. The clients that run the night jobs are Mac with FMv11, almost all other clients are FMv10.

                   

                  It has happened a handful of times now, and is very annoying... :(

                  • 6. Re: FileMaker 11 Self-Reference Global Auto-Enter fail
                    TSGal

                    carlsson:

                     

                    Thank you for your post.

                     

                    With a couple of users now reporting the problem, it may be an issue with FileMaker Pro 11.  However, with the problem being intermittent, this makes it frustrating for both of us.  Please let me know if you are able to narrow this down.  Or, if you see something out of the ordinary just prior to this happening, let me know.  Any plug-ins installed?

                     

                    TSGal

                    FileMaker, Inc.