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.

Overcoming the Close Window controls?

Featured Replies

Hello!

Quick question as to whether there is any way to overcome the normal "window close" controls (e.g. on a OS X Mac, the top left red button).

I have certain validation scripts that run upon exiting from a field (using a free event plugin), but they can sidestepped by a user who changes a field and then closes the window (without leaving that field).

I could script a close window button, but that's of no use if I don't void the normal OS one.

Any way to do this without expensive "menu" plug-ins?

Thanks for your assistance.

Justin.

One common method is to lock the use in a paused script, but even this can be circumvented under Windows by quitting the application.

This is why the built-in field-level validation is preferred.

How are you implementing the script event? Using auto-enter to trigger the script is probably how you're doing it, but if you set it up to use field validation calc., then it will run when the user closes the file while they're in the field.

To your question, one way to disable the close box is to pause in the middle of an infinitely looping script with user abort off. The user is stuck in the script (the close box and many other menu controls are disabled) until they run a script event that exits the loop. (this could be part of your triggered script)

Dana

You can get around the quitting the application hole by adding a flag field that's required to have a value, then hiding it behind a button and not allowing field entry. Then there's no way a user can quit FMP without using your scripted button to get out of the loop. (The button populates the flag field) I used this for a data entry kiosk on windows with FMP6 for a couple of years until I moved to a kiosk-mode enabled solution in FMP7.

  • Author

That's all good advice, although from a processor standpoint, imfinite loops scare me. smile.gif

Let me try a few of those suggestions next week and I will report back....

The loop doesn't just run infinitely... it pauses on every iteration waiting for your input (so it won't eat up cycles). You just have to make sure to program a way out of it. If you only allow one way out, the user is forced to use your scripts.

What is this kiosk-mode solution? Is it available in FMP7?

Thanks.

kiosk mode is available only by enabling it using the developer utilities in filemaker developer. Basically, you enable this mode in a file for certain non-admin privilege sets. When users with these privilege sets open the file, all the menus, window title bars and resize controls disappear. Also, access to the rest of the computer and OS is limited to only what you allow through filemaker scripted buttons. You don't need filemaker developer to use a kiosk-enabled file, but you do need it (or need to know someone who will do it for you) to enable the file.

Dana

Couln't you just set the database to run an abort-disabled script on closing that reopens the database if specified conditions are not met?

Thanks for the info, Dana. I think the kiosk mode is the way to go. I'll try to get my hand on the Developer version to enable this.

Cheers!

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.