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.

Scripts calling external subscripts??

Featured Replies

When a script step callls an external subscript I don't understand 'which' specific script in the external file is called.

I know this is a general question and am assuming it can be answered without an example. If examples are needed I can pull those together and re-post.

TIA

Steve

When you use Perform Script to call an External script, there is no direct way to tell what sub-scripts are going to be called. To get the name of the external script, you have to choose External script, then note the name of the script. To see sub-scripts of the external script, cancel out of Scriptmaker, open the external file, open Scriptmaker and look at the script you noted to see if it has any sub-scripts.

You can print the script definition, which will show the file name and the script name being called. If you don't want to waste paper and have PDF writer you can create PDF's of the script definitions.

A good habit to get into with external scripts is to always place a comment line into your script naming the external script. I always use a comment one line before the Perform External Script function to show the script name. The only problem with this is that if you rename the external script the comments will not update.

  • Author

OK. I'm still confused (not unusual). I will attempt to provide more info to see if I can get an answer that will enlighten me.

I have 6 databases, 2 sets of 3. Each set has a 'contacts' database which is then related to a 'phone numbers' database and an 'Interests' database. One set is the 'active' set and the other is the 'archive' set. The objective is to move selected related records from one set to the other. (This example was dloaded from an FMP user group site.)

To start the process you open the active contacts db (a_cont) and click on selected checkboxes that you want to archive. When the 'archive selected records' button is clicked the 'archive contacts' script is called. It reads as follows:

Allow User Abort(off)

Exit Record/Request

Set error capture(on)

Go to related record(show, "archive_check")

Perform Script(Sub-scripts, External: "Interest.FP5")

Perform Script(Sub-scripts, External: "Phone.FP5")

Perform Script(Sub-scripts, External: "z_cont.FP5")

Delete All Records(no dialog)

"Archive_check" is a self relationship between the archive flag and a calc field named 'constant' which is always = 1.

Now the 'interest' database has 3 scripts in it. 'Archive Items', 'Import from z_int' and 'open'. Are all three of these scripts run? There is nothing I can see in the calling script step that specifies any one script.

I have attached the self extracting zip (archive.exe) for your review.

archive.zip

"There is nothing I can see in the calling script step that specifies any one script."

e.g.: "Perform Script[sub-scripts, External: "Interest.FP5"]"

Ok, in ScriptMaker, in your "Script definition for ..." window, if you will highlight the line: "Perform Script[sub-scripts, External: "Interest.FP5"]", you will see "Specify: External Scrip..." Click on that button. It is a drop-down. If you double-click on "External Script" you will get the window "Specify External Script" in which you specify the database ("interest.fp5"), and a bar which, when clicked upon, allows one to designate the script to be run. That name does not show in the line which is cited above.

Further, if there are scripts internal to the db for the active "Script definition for ..." window when you click on the dropdown "Specify: External Scrip...", they are listed below the "External Script" and are similarly available for designation.

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.