Jump to content

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

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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

Posted

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

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