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.

Exit Script Trigger always closes window...

Featured Replies

I am running FM 12 03 advanced in OSX.

 

I have a layout called Patients.   I have allowed the 'X' close button the window to let the user close the window. 

 

When the user clicks the 'X' to close the window, I prompt the user with the querstion: "Are you sure you want to exit ?" (Y/N)

 

If they press No, I want to negate the 'X' close window button and leave the window open.

 

post-72145-0-18052700-1353195179_thumb.j

 

post-72145-0-80867000-1353195099_thumb.j

 

The problem is that at the end of the script, even if the user says 'No', after the script closes the window closes anyway.

 

I think I can capture their response in a $$Variable and then after the window closes if $$Variable ="No" then reopen the window.  But, isn't there a way to negate the "X" choice and just leave the window open?

 

 

Before 'End If' add the script steps:

Else

Exit Script [Result: 0]

  • Author

Before 'End If' add the script steps:

Else

Exit Script [Result: 0]

That worked. 

Am I correct in understanding that letting all the script steps complete WITHOUT a EXIT let's the 'X' close window complete.  But, when I interrupt the script with the Exit, it aborts the 'X' Close?

 

Thanks for replying...

You need to make the script result 0 (zero, false). Then the intended user event is canceled. This works only with triggers which are executed before the triggering event of course.

 

When the result is based on a calculation make it 1 (one, true) to allow the event

 

See the help for more information (click on a trigger to see if it is executed before or after the event)

 

http://www.filemaker.com/12help/html/script_trigg.38.1.html#1029602

Another version of your script

post-66194-0-66578900-1353260914_thumb.p

I believe this is better off handled using a custom menu, by  modifying the Close command to issue the prompt.

 

Also, don't exit the FMP application, just close the window. An assumption is being made that your window is the only one that the user has open. I find nothing more annoying than closing somebody's database only to find that it quits the whole application. The horror!

@Vaughan: +1

  • Author

Great ideas!  Thanks guys...

 

Onward through the fog...

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.