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.

goto layout, trigger script

Featured Replies

I'm fairly new to FMP9. Is it possible to attach a script to a layout, such that this script automatically triggers each and every time the layout is presented?

Basically all I want to do is ensure a global field is empty on arrival to the layout.

Kind regards,

Quick answer is to put the Set Field in your script,

i.e. SetField(yourGlobal; "")

HTH

Lee

Is it possible to attach a script to a layout, such that this script automatically triggers each and every time the layout is presented?

Basically all I want to do is ensure a global field is empty on arrival to the layout.

Unfortunately, no you can't trigger a script on a layout load (possibly in the future though).

What you can do is have a script set that field to null when FM starts up, so a user will have a blank field the first time the layout loads. Then whenever you use that field, presumably in a script, you can set it to null at the end of the script.

If you use an event script plug-in such as DoScript or zippScript, you can use a webviewer to trigger a script when you want (onLayoutLoad is no exception).

But I would say that if you're new to FileMaker, this might be a little tricky.

Unfortunately, no you can't trigger a script on a layout load (possibly in the future though).

The assumption is, that Morley has scripted layouts movements. By adding the Script Step I suggested, he can clear his global field.

Lee

But I would say that if you're new to FileMaker, this might be a little tricky.

I agree: the difficult part here, I think, would be to NOT trigger the script on screen refresh.

Another option is to limit the user to scripted navigation only. Then you can clear the global as part of the script that navigates to the layout.

  • Author

I'm familiar with other programming environments where layouts, fields and much else can automatically trigger a script on entry and/or exit. Surprising that it's missing in FMP9 Advanced.

Really I'm looking for something that will do it for me, so I or some other programmer after me doesn't have to remember to script the global field blanking every time that layout is called for. And not to do it if the screen is simply being resized or refreshed. That's equally important.

Details, details, details. All I ever see is details!

Kind regards,

It's not surprising at all, given the nature (and history) of Filemaker. I am not sure it even qualifies as a "programming environment". Perhaps in the next version.

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.