Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5926 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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,

Posted

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

i.e. SetField(yourGlobal; "")

HTH

Lee

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted

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,

Posted

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.

This topic is 5926 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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