4 Replies Latest reply on Feb 12, 2014 12:15 AM by user19752

    Navigate to different layouts for iPhone 4 and 5 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 ]


      Go to Layout [ “iPhone 4 Inch” ]



      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.


      Anyone know why this doesn't work as part of the OnFirstWindowOpen script trigger but does when performed manually afterwards?