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.

Featured Replies

The new FM 10 events are getting a lot of press, but there's one event that we've always had that just got a tiny bit more powerful. The OnLastWindowClose event is the event which has always triggered the script you've selected to run when closing the file. In FM 10, this event has now been modified to run the script prior to the event, which means that you can now ask the user if they really want to quit the database. If you return an Exit Script [result=false] step then it wont execute the close command on the last window for that file.

Edited by Guest

Good to know. I haven't come across this yet as I have used a custom menu for exiting the application.

Hi David

Ok, this is interesting but is it praticable ?

Let say that I have this script to run when closing the file to prevent accidental closing with the windows's X :

Show Custom Dialog [ "You can't close this file in this way" with OK ]

Exit Script [ Result: 0 ]

End If

How can I modify that script to allow the user to close the file ONLY with a button on the layout ?

This, for example assigning 1 to the script parameter of the button, do not work:

If [ Get ( ScriptParameter ) ]

Close File

Else

Show Custom Dialog [ "You can't close this file in this way" with OK ]

Exit Script [ Result: 0 ]

End If

The problem is that I can't write anymore the script step "Close File", otherwise the script will fire another time ( and w/o the script parameter ).

AFAIK, all you have to do is return a true exit script and the triggering event (close last window) will continue.

If [ Get ( ScriptParameter ) ]

Exit Script [ Result: 1 ]

Else

Show Custom Dialog [ "You can't close this file in this way" with OK ]

Exit Script [ Result: 0 ]

End If

AFAIK, all you have to do is return a true exit script and the triggering event (close last window) will continue.

But where is the "Close File" step ?

We aren't closing with the close command, but with a button on the layout that fires this script.

I don't want to spoil it for you - I am sure you can figure this out. :

http://www.screencast.com/t/XHw9WDyXB

Yes, your ControlledClose10.fp7 do exactly what I am NOT ( still ) able to do.

Searching... :

  • 3 weeks later...

:sorrysign:

Edited by Guest

  • 3 weeks later...

Hi, where is the ControlledClose10.fp7? Can you send me the download link!

Create an account or sign in to comment

Important Information

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

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.