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.

Modifying Quit behavior of Runtime/custom menus?

Featured Replies

I have a solution I am binding as a runtime (both WinXX and MacOSX). On the layout there is currently a "Quit" button which runs a shutdown script.

I tried setting the "File Option" to run the shutdown script when closing the main file. In the Developer only layout I have a script to close all the solution files (not exiting FileMaker). The shutdown script is run for several reasons, one being it backups the solution.

Here is my problem/question:

By setting the "File Option" to run the shutdown script on close, my old "close all files" script triggers the full shutdown script, running the backup and exiting FileMaker.

Is there a way to modify the runtime quit behavior with out setting the File Option? I looked at Custom Menus but didn't see anyway to modify the

default Quit behavior (I see I can add my own Quit command but then there are 2 quit commands, mine and the runtime default!).

If I don't set the native "Quit" behavior then the user can quit the runtime without the shutdown script being run, which is not what I want.

TIA.

What I have done in one of my solutions is to have the shutdown script use the Get(ApplicationVersion) to see if the first word is "Runtime". If it is, then quit the runtime. Otherwise allow the user select if they want to close the solution or quit FileMaker altogether.

  • Author

What I have done in one of my solutions is to have the shutdown script use the Get(ApplicationVersion) to see if the first word is "Runtime". If it is, then quit the runtime. Otherwise allow the user select if they want to close the solution or quit FileMaker altogether.

thanks Mike.

What I want is the following (may not be very clear above):P

I want the "Quit" button on the layout and the runtime Application Quit button to have the same functionality. I couldn't find a way to attach the runtime Quit button (exit under WinXX) to a script execpt with the "File Options". The problem with the "File Options" is that I also want to have a Developer Only ([Full Access] PS)

script that just closes all the files and leaves FileMaker running. But the "File Option" script

gets triggered by the File closing, thereby linking these two functions - which is not what I want.

Sam,

I think I understand what you're trying to do. Before you create the runtime, attach a script similar to this to your exit/quit button.


If [ LeftWords ( Get ( ApplicationVersion ); 1) = "Runtime" ]

  Exit Application

Else

  Show Custom Dialog [ Title: "Exit"; Message: "Do you want to Exit FileMaker too?"; Buttons: “Yes”, “No”, “Cancel” ]



  If [ Get ( LastMessageChoice ) = 1 ]

    Exit Application

  End If



  If [ Get ( LastMessageChoice ) = 2 ]

    Close File [ Current File ]

  End If



End If



Hopefully, if this is not exactly what you need, it will give you some ideas.

Mike

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.