Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ipad and Iphone aware layout script

Featured Replies

This is my attempt at a script extending the "ipad/iphone aware" script hosted at filemakers website. 

http://help.filemaker.com/app/answers/detail/a_id/8079 )

***It requires that one uses the convention LayoutName_Ipad, LayoutName_Iphone, with the pc/mac layouts not having the "_" suffix. Of course the convention can be changed. 
Also the fm website triggers the script with the FirstWindowOpen. I am not sure why they've elected this. Surely the check should be performed at every layout, and then the user is taken to the iphone/ipad counterpart.**

If [ PatternCount ( Get ( ApplicationVersion ) ; "Go_iPad" ) = 1 ]

Go to Layout [ If( Right( Get(LayoutName); 4) = "Ipad"; Get(LayoutName); Get(LayoutName) & "_Ipad") ]

Else If [ PatternCount ( Get ( ApplicationVersion ) ; "Go" ) = 1 ]

Go to Layout [ If( Right( Get(LayoutName); 6) = "Iphone"; Get(LayoutName); Get(LayoutName) & "_Iphone") 

]

Else

Go to Layout [ Get(LayoutName) & "_Ipad" ]

End If

Exit Script [ ]

Presumably, once you're on the starting layout optimized for a given device, the navigation available to a user could only take them to other layouts also optimized for the same device — thus only the OnFirstWindowOpen trigger is needed if the design of the solution accommodates that approach. This is particularly handy if the interfaces for different devices are different enough that some layouts for one device don't have an equivalent for the other. iPhone interfaces usually have more layouts than iPad interfaces with equivalent functionality, in my experience.

  • Author

Presumably, once you're on the starting layout optimized for a given device, the navigation available to a user could only take them to other layouts also optimized for the same device — thus only the OnFirstWindowOpen trigger is needed if the design of the solution accommodates that approach.

Is there a straightfoward way to do that? I suppose this is the better solution, instead of opting to check the layout. Would you need additional scripting to do so?

 

This is particularly handy if the interfaces for different devices are different enough that some layouts for one device don't have an equivalent for the other.

 

It's a much neater approach, albeit how simple is it to implement?

 

 

iPhone interfaces usually have more layouts than iPad interfaces with equivalent functionality, in my experience.

 

For sure. Well, if one were to use the afforementioned approach in the expanded script, one could add an _1_, _2_, _n_ etc. after the layout name and before the _idevice suffix (are layout names case sensitive, btw?)

 

Anyway, I 'd love to hear how others are going about with scripting the idevices into the layouts.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.