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.

To trigger a script or button from a field entry?

Featured Replies

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

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

  • Author

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

...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...
  • Author

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

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.

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.

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

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...

Bruce,

Do you mean it kills it totally, or just the features provided by the plug in aren't web compatible?

Thanks

From what I here you cannot use IWP if you activate the example plugin.

Hmmm. Then I'm very wary of activating the plug in. Seems to be too high a price to pay even though I'm not using IWP at the moment.

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

Oh! Can anyone else confirm before I get hooked on this plugin and regret it later?

WavesinMotion have an events plug-in that will do the same thing. Don't know if this will interact with IWP.

Yeah, I just like free better. smile.gif

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.