Jump 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.

Iphone layout wrongly appear in runtime

Featured Replies

HI,

I have deselected all the ipad and iphone layout under "Manage layout", then make a runtime of the sample invoices.fmp12, however when I open the runtime version, I can see the layout has changed to customer | iphone and when I change the layout to product, after click on the product button, the layout again change to product | iphone ???

Is it something that I missed or it is a bug ?

  • Author

I have also tried to delete all the lpad and iphone related layouts, and redo the "runtime" version again, the layout has changed to "startup screen" even though the startup screen layout was not selected ?

Additional problem with the same sample program invoices.fmp12, in runtime, the "Layout Selector" not working too.

Please help.

Once you deselect a layout in Manage Layouts you still can navigate to it.

You'll need to detect the circumstances (runtime / iphone / ipad / hosted / web) in your script and then depending on the result go to the appropriate layout, using the 'If / Else If / Else' script steps.

HTH

  • Author

I must clarify that with the source, it is working perfectly, the problem only comes when I convert it into a runtime mode. I believe it is a BUG that FM support need to look into urgently.

I have tried to use the if / Else and still not good, anyone has converted into runtime program can share the solution ? [Henk, thanks for your response and suggestion]

I thought FM 12 with the additional ios/ipad/iphone stuff is great, however, it should not take away the current simplicity or increase the work load of users to convert into runtime program.

Post your startup (onFirstWindowOpen) script here. Maybe we can take a look.

  • Author

In this file, when I assign the script "Trigger | On First Window Open" (Inside the script, it already has the If/Else selection) to the layout "startup screen", then use Developer Utilities to create a runtime version, I just got a blank screen and the "command" icon appear, that I was meant by not good. 

test4.zip

Your OnFirstWindowOpen Script is set to the script "Trigger | On First Window"

The start layout is set to "Startup Screen"

The OnLayoutEnter Trigger of that layout is also set to "Trigger | On First Window Open"

So if your file opens this script is already triggered twice.

Then the script goes to another layout and on line 5 you do: Go To Layout [original Layout], which is "Startup Screen", then the same script is triggered again and then subsequently triggered by line 5. Thus an infinite loop is going on which keeps you on the layout and the evaluation of the platform is never happening.

 

Correct this situation and then look at the problem again.

  • Author

OK, I have removed the script "Trigger | On First Window Open" from the event OnLayoutEnter in the "Startup Screen" layout. i.e. it is back to the default/original setting except that I have added some sample records into the "customer", "product", and "invoice" tables. Previously, I did not set/add "OnFirstWindowOpen" with the script "Trigger | On First Window", I guess it is a default setting as I cannot see this "OnFirstWindowOpen" script under manage script.

 

Anyway, now is back to the error I encountered the first time, the first layout goto "customer | iphone" instead of "customer", AND, when using the "layout selector" button e.g. select product, the layout will goto "products | iphone" in runtime mode.

 

 

test4.zip

Line 9 of your opening script is:

 

Else If [PatternCount ( Get ( ApplicationVersion ) ; "Pro" )]

 

This should be:

 

Else If [PatternCount ( Get ( ApplicationVersion ) ; "Pro" ) or PatternCount ( Get ( ApplicationVersion ) ; "Runtime" )]

 
 
Probably the same thing with your other issue. These things are easy to see when you use Script Debugging.
  • Author

Hi Henk, Thank you so much.  :worship:

 

I still think that FM should do something more intelligent to this issue.  :getlost:

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.