Ranges Plug-in
for FileMaker Pro 4/5
The powerful Ranges Plug-in for FileMaker Pro uses a starting date and an ending date to generate a range of values between those two dates. The Ranges plug-in will generate number ranges as well.
Mac & Windows Compatible

How the Plug-in Works

How the Plug-in Works:   1 | 2 | 3 | 4 | 5  

Integration methods

This area discusses how you integrate the plug-in when you are going to be make your solution available to a network or distribute it commercially.

When incorporating the Ranges plug-in (and other Troi plug-ins) into your solutions you need to make sure the plug-in will function properly with each copy of FileMaker that uses the plug-in. This process is called Plug-in Activation. Each plug-in must be activated individually before being used. So if you use three different plug-ins each must be activated. If all three plug-ins are from Troi then activation can be handled using a single script or with multiple scripts. Other plug-in vendors may have different activation methods.

There are two methods of plug-in activation for this plug-in. One is used when distributing your solutions and the other is for developers when they are developing.

Distribution method

The best time to activate a plug-in is when the very first file of your solution starts up. This is due to the fact that a guaranteed startup script will run if used. If a related file is opened via a relationship, it's possible that the startup script for the file may be bypassed.

How to do it

Activation is an easy process. When a file using the plug-in opens, simply check to see that the plug-in is installed. You then register the plug-in for use. This all happens within one script.

You can find this script within the included file named Register.fp3. You can simply duplicate or import (FMP5 only) this script into your own solution. You will need to modify the script based on the plug-in you are using. The code for the script is found below.

The text in blue (external function) would be changed according to the plug-in being used. In the case of the Ranges plug-in "Rang-Version" is the proper function. The text in red would also be adjusted according to which plug-in was being tested for. Text in green represents the two fields you'll need to have in your database. The code you store in the Register field is generated by the Register.fp3 file.

Comment ["------ Plug-in test ------"]
Comment ["READ ME BEFORE DUPLICATION OR IMPORT! You must create two fields in your database prior to using this script in your own solutions. 1. Create a global text field named Result 2. Create a calculated text field named Register and input the code provided in the registration database."]
Set Field ["Result", "External("
Rang-Version", "")"]
If ["PatternCount(Result, "Troi Ranges Plug-in") < 1"]
 Beep
 If ["Status(CurrentPlatform) = 1"]
   Show Message ["Troi Ranges Plug-in not found. Please put the plug-in into the Extensions folder within the FileMaker folder.
   Also enable all the plug-ins under the application preferences."]
 Else
   Show Message ["Troi Ranges Plug-in not found. Please put the plug-in into the SYSTEM directory within the FileMaker directory.
   Also enable all the plug-ins under the application preferences."]
 End If
End If
Comment ["------ Start Registration ------"]
Comment ["-"]
Set Field ["
Result", "External("Rang-Version", Register)"]
Comment ["If registration is successful a 0 is returned."]
If ["Result <> 0"]
 Beep
 Show Message ["Registration of Dialog plug-in failed.
  Please use your own registration data and make sure you are registering with the correct plug-in."]
End If
Comment ["-"]
Comment ["------ End Registration ------"]

IMPORTANT: Before you duplicate or import this script into your own solution you will need to create two required fields. These are the global text field named Result and the text calculation field named Register. The code for the Register field is generated by the Register.fp3 file (click here to see an example). You will receive an email with your registration information.


Back to top


How the Plug-in Works:   1 | 2 | 3 | 4 | 5  

Ranges Plug-in is copyright © 2000 Troi Automatisering. All rights reserved foreign & domestic.
Distributed by ISO Productions, Inc.