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

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

Recommended Posts

Posted

Is there any way to trigger a script (or 'push' a button) via a field entry and then tab to next field.

I know this hasn't been possible in the past - wondering if any advancements in V7.

thanks

Posted

I just saw a demo of this today in FM7. However, it's done with a plug-in which i don't believe they are shipping yet as there are some issues. There is also an available plug-in called ScriptIt from Comm-Unity Networking Systems that can do this.

Something to think about, however: Lets say the script you want to trigger simply multiplies the value of FIELD1 by 2. So you enter "10" into FIELD1, then scroll to the next record, thus triggering the script (by exiting the field). Which record is this script going to be performed on? Probably record 2, which is not necessarily what you want. Just an issue to keep in mind, from someone who would DESPARATELY love to have this feature available natively in FM.

Jerry

Posted

thanks Jerry for the info. Nice to know that FM7 might be doing something about it - I've been hankering for it for YEARS!

I didn't know that plug-in - had a look and as it does other things as well it might be worth it.

cheers

Michael

Posted

...wondering if there were any advancements in FM7.

In many cases, the scripts we wish to execute revolve around setting the contents of that (or another) field with a calculated result from an If[] statement. FM7's new ability to modify the direct data as if it were an unstored calculation has actually decreased my number of scripts (and shortened many that remain), as well as reduced my required calculations - particularly unstored ones. A simple number field containing a 1 is a good example.

Instead of trying to trigger a script when leaving an AmountPaid field to see if an Invoice is paid in full (or setting another field with a 1), I have a standard number field called Unpaid with Auto-enter calculation of:

(AmountDue > AmountPaid)

This enters a 1 if debt is still outstanding and it updates whenever data is changed in either field. It eliminates dealing with empty fields, summing, unstored calculations or scripting finds that use an If[] calculation. Then a simple Find on that Indexed 1 quickly produces my outstanding Invoices. And my relationship to Credit (only unpaid) table is also instant. Many of my old scripts were setting fields that would not automatically update.

As far as I know, you still need a plugin to trigger upon field exit, but you will find you need it much less often than with prior versions. Just remember to unclick "Do not replace existing value for field ..." right under the Auto-enter by calculation.

  • 3 weeks later...
Posted

thanks Moonshadow for all that. Yes, I can see the huge leap with that new FM7 change - even though I rarely deal with financial stuff, it would apply in all sorts of situations.... in fact as I think about it I can see the scripts shrinking and disappearing in my mind....

But in fact my need is more in the area of navigation than calculation - so I guess I investigate the plug-in solutions.

thanks again

Posted

i just asked this question (or close to it) in another thread. And now i have my answer. I'd also like to see this.. more for navigation then anything else.

Posted

I recently posted about the Example.plugin that comes with FileMaker Developer (which I have). It is available to all at http://www.databasepros.com, Resources, Tips, "New" button. There is a clearly labeled example file that shows that this plug-in can run a script (by name) on field exit.

One wonders if FileMaker would sanction this, but this is John Mark Osborne's site. He's one of the best certified FileMaker trainers around, co-author of "Scriptology," etc., so one assumes it's with their permission.

Posted

The example plugin is great. But one unfortunate side effect is that it kills instant web publishing.

Posted

So this "example" is for FM 7? Besides using a plug-in, FM6 does not support triggering a script (or any event) leaving or entering a field?

  • 3 weeks later...
Posted

The example plugin totally killed IWP. However - now that FM7.02 is out, that problem went away, at least for me.

This topic is 7467 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.