3 Replies Latest reply on Feb 13, 2014 8:02 AM by TSGal

    FileMaker Go - OnFirstWindowOpen script trigger not navigating to correct layout

    fmdataweb

      Summary

      FileMaker Go - OnFirstWindowOpen script trigger not navigating to correct layout

      Product

      FileMaker Go

      Version

      13.02

      Operating system version

      iOS 7.0.5

      Description of the issue

      I've encountered an issue with a FileMaker Go database I'm building. I've created separate layouts for the iPhone 4 (3.5" screen) and the iPhone 5 (4" screen).

      I've setup a OnFirstWindowOpen script trigger to take the user to the correct layout when they first open the file. To do this I'm using the Get ( WindowContentHeight ) function. To simplify things here's the script (assumes portrait orientation - I'm checking for this using the Get ( WindowOrientation ) function but have removed that for now whilst I troubleshoot my problem):

      If [ Get ( WindowContentHeight ) > 480 ]
      #iPhone5
      Go to Layout [ “iPhone 4 Inch” ]
      Else
      #iPhone4
      Go to Layout [ “iPhone 3.5 Inch” ]
      End If

      When I open the file on an iPhone 5 in Portrait mode it takes me to the iPhone 4 layout, even though Get ( WindowContentHeight ) returns 504.

      If I then perform the same script manually it works as expected and takes me to the iPhone 5 layout.

      I have tried this using a file hosted by FileMaker Server and the same file running locally on the iPhone device.

      Steps to reproduce the problem

      Create a script with different layouts as follows:

      If [ Get ( WindowContentHeight ) > 480 ]
      #iPhone5
      Go to Layout [ “iPhone 4 Inch” ]
      Else
      #iPhone4
      Go to Layout [ “iPhone 3.5 Inch” ]
      End If

      Assign this as the OnFirstWindowOpen script trigger for the file.

      Expected result

      Using an iPhone 5 in portrait mode it should navigate to the "iPhone 4 Inch" layout when the file opens

      Actual result

      It navigates to the “iPhone 3.5 Inch” layout instead.

      Workaround

      None. However if the same script is performed manually after logging in it takes the user to the correct layout, but not when part of a OnFirstWindowOpen script trigger.

      I can supply a simple demo file if needed.