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.

Can you trigger a script by changing a fieldentry?

Featured Replies

I know you can trigger a ScriptMaker script by defining it so it appears in your Script menu, or by tying it into a button, but are there other ways of triggering scripts? In particular I'd like to run a script that affects various fields in an entry whenever any of those entries has been modified. There must be a way to make it run by perhaps linking it to a modification date, but I can't see it.

And if that's not possible, is there a way to run a maintenance script upon opening or closing that will perform itself on each and every entry in the database?

I'm running FM 3.1 on mac OS 9.2.2 but will soon be upgrading to FM 6.1.

Please let me know if I'm not being clear; I'll try to explain it a bit better. And thanks.

Version: v3.x

Platform: Mac OS 9

Scripts cannot be triggered by data input, a feature we'd all like to see added to FM.

There's a preference (Document, not Application) to run a script when opening a file. In this script, use this basic loop:

Show All Records

Go to Record/Request/Page [First]

Loop

--- do your thing here

Exit Loop If ["Status (CurrentRecordNumber) = Status (CurrentRecordCount)"]

Go to Record/Request/Page [Next]

End Loop

Could calculation fields do this instead of a script?

  • Author

Hi Sam,

Actually that script might be just as good, thanks very much.

I've been trying to think of how to get the calculation field to do it, but it's no use. Can calculation fields directly change the values of any other fields besides their own?

Can calculation fields directly change the values of any other fields besides their own?

No, but lookups based on other fields changing can. It all depends on your structure as to whether it will be a doable or relatively easy task.

  • 6 months later...
  • Author

OK this one reeeeeally late reply to CyborgSam, but I tried the script you mentioned: it looks fine, but when I run it, it only affects the first record and that's it.

Any ideas why? Thanks

Do you have the Go to Record/Request/Page [Next] step in it? Can you post your script so we can see what the problem may be?

  • Author

Sure -- this is the script, and it's pretty much the same as suggested above:

Go to Layout ["Main Layout"]

Enter Browse Mode []

Show All Records

Go to Record/Request/Page [First]

Loop

Perform Script ["trim text fields"]

Perform Script ["autofill region code"]

Exit Loop If ["Status (CurrentRecordNumber) = Status (CurrentRecordCount)"]

Go to Record/Request/Page [Next]

End Loop

The two scripts it calls are pretty basic and work otherwise, so I'm guess the problem isn't there.

(The budget for this thing isn't great, so I'm trying to avoid paying for a solution to it.)

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.