5 Replies Latest reply on Apr 14, 2011 12:44 PM by TSBear

    Get ( ApplicationVersion ) is null on IWP Client

    TimShepherd

      Summary

      Get ( ApplicationVersion ) is null on IWP Client

      Product

      FileMaker Pro

      Version

      11.03 Advanced

      Operating system version

      MacOS 10.66

      Description of the issue

      Setting $$Client_Application_Type using Get( ApplicationVersion ) in a script is returning empty. On FM Client, correctly identifies "ProAdvanced".

      Its like the check is being entirely ignored when I do the following

      If [( PatternCount($$Client_Application_Type,"web")]
          PerformScript ["Login Web Client"]
      End If

      Steps to reproduce the problem

      I have verified via a Field that Get( ApplicationVersion )is returning no result when viewed in a web client.

      Also, IsEmpty($$Client_Application_Type) is also ignored.

      Expected result

      "Web"

      Actual result

      Invalid result, null.

        • 1. Re: Get ( ApplicationVersion ) is null on IWP Client

          Tim Shepherd:

          Thanks for posting.

          I'm unable to replicate this behavior. I created a new database with one calculation field that runs Get(ApplicationVersion). I then enabled Instant Web Publishing and hosted the file out through FileMaker Pro 11 Advanced on an OS X 10.6 machine. When accessing through IWP, the calculation field shows "FileMaker Web Publishing 11.0v2".

          Do you get this same behavior in a new database?

          TSBear

          FileMaker, Inc.

          • 2. Re: Get ( ApplicationVersion ) is null on IWP Client
            TimShepherd

            Hi, I tried a new database as you suggested and that worked fine, when I tried to replicate this back in the one Im developing it returns nothing. I switched off my startup script and told it to go straight to a layout with the field displayed on it, under FM client it displays correctly, but under IWP, nothing. Tim.

            • 3. Re: Get ( ApplicationVersion ) is null on IWP Client

              Tim Shepherd:

              That narrows it down quite a bit. Would you be willing to send me a clone (copy without records) of your file? Please see your inbox at the top of this screen for instructions on where to send the file.

              TSBear

              FileMaker, Inc.

              • 4. Re: Get ( ApplicationVersion ) is null on IWP Client

                Tim Shepherd:

                I received your file and, after a bit of investigation, it appears that the issue stems from the use of the Allow Toolbars[Off] script step in your "Switch off Tool Bars and Menus" script. It appears that if this script step is run in Instant Web Publishing, the script will just silently quit. This script step isn't web compatible but the expected behavior is for it to skip this step and continue with the rest of the script.

                I was able to reproduce this behavior in both FileMaker Pro 10 and 11 on Windows XP and OS X 10.6. I've forwarded my findings along with this post to our Development and Quality Assurance departments for further investigation.

                As a workaround, you can wrap this script step in an If statement that checks the platform. See below for an example.

                If[(PatternCount(Get(ApplicationVersion);"web")  =  0]

                Allow Toolbars[Off]

                End If

                TSBear

                FileMaker, Inc.

                • 5. Re: Get ( ApplicationVersion ) is null on IWP Client

                  Tim Shepherd:

                  I apologize, it appears I was previously mistaken. A member of our Quality Assurance department has notified me that this is how FileMaker is designed to deal with web incompatible script steps used in IWP. Specificaly, when a script that is not web compatible is run in web publishing, it should abort all steps following it. This is because the Allow User Abort setting is enabled by default. If you add Allow User Abort[Off] to the beginning of a script, it will ignore incompatible script steps.

                  I should note, however, that wrapping the incompatible script step in an If statement that tests the application version is still the recommended way to resolve this. Using Allow User Abort[Off] can have an impact that you might not intend such as disallowing a user from quitting a script that's taking an unexpected amount of time.

                  TSBear

                  FileMaker, Inc.