1 Reply Latest reply on Jul 30, 2012 8:33 AM by philmodjunk

    Script: iOS specific layouts

    BryanN

      Title

      Script: iOS specific layouts

      Post

      Anyone have a good direction to go in for iOS specific Layouts?  Ideally, I want to create scripts that will choose the iPhone sized layout when the user is on Filemaker Go for iPhone or likewise for the iPad Go layout.  Additionaly, I don't want the non-client specific layouts to show up (so mobile layouts don't show up for desktop users).  Any thoughts?

        • 1. Re: Script: iOS specific layouts
          philmodjunk

          You can't dynamically include/exclude layouts from the layout menu at the top of the screen. They are either visible in this layout while in browse mode or they are not.

          But you can hide/and Lock tool bars and then provide your own layout drop down based on a global field and it can be either a conditional value list or just scripted such that selecting a layout name such as "data entry" trips a script triggered script that takes you to the version of that layout that's appropriate for the current device being used.

          I'd set up this in a script set to be performed every time the file is opened:

          Set Variable [$$Device ; Let ( G = Get(ApplicationVersion) ,
                                                    Case ( PatternCount ( G ; "IPad" ) ; "IPad" ;
                                                               PatternCount ( G ; "Go " ) ; "IPhone" ;
                                                               PatternCount ( G ; "Web" ) : "Web" ;
                                                               "Desktop"
                                                             ) // case
                                                   ) // let ]

          Then I'd include these same bits of text in my layout names in a consistent format so that I can use script steps such as:

          Go to Layout [ "DataEntry " & $$Device ]

          with the Layout name by calculation option to take the user to the correct layout for their device. With a drop down list of layout names in a global field, it might look like this:

          Go to Layout [ Globals::gLayoutDropDown & " " & $Device ]