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.

How to Execute Variable Script Name?

Featured Replies

Is there a way (inside FileMaker rather than going out to a VB shell) to specify a variable script name.

For example, I want to have a field in a table that says if Record 1, then run the name of the Script in Field "Script"... and so on for Record 2, run the Script in the Field "Script".

I could build an elaborate VB script to do it... but is there a way inside FileMaker?

Thanks,

CCB

You could put the record number (or unique id or whatever) into the script parameter, and then get the script to process the parameter accordingly.

The main script will have to have all of the other scripts hard-coded into it in a switching statement.

Normally we do as Vaughan says, use a script parameter, pass a script Variable, or (in the old days), use a global field, then use If, Else If statements to branch the script. But I can see where, if you have lots of scripts to choose from, it could be simpler to call a script by name.

If you mean that the VB script is elaborate to set up (seems so to me, but then people say the same thing about AppleScript :(-), there is a free plug-in from 360Works, Scriptmaster, which can call a FileMaker script by name. The syntax is fairly simple.

fmpro.performScript(tableName, scriptName); return true;

  • Author

Thank you both.

I think I will hard code right now... but I think Scriptmaster is the way to go.

CCB

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.