Troi Text Plug-in 5.0
for FileMaker Pro 19
USER GUIDE
December 2021
You can visit the Troi web site at: www.troi.com
Troi Text Plug-in is copyright 1998-2021 of Troi Automatisering. All rights reserved.
Table of Contents
Installing plug-ins
A FileMaker Pro plug-in can be installed directly from a container field. Installation is therefore very easy: just open the "All Text Examples.fmp12" example file and the startup script will install the plug-in for you. See also the EasyInstallTroiPlugins.fmp12 example file which contains the actual plug-in and install script.
TIP You can check which plug-ins you have loaded by going to the plug-in preferences: choose Preferences from the Edit menu, and then choose Plug-ins .
You can now open the file "All Text Examples.fmp12" to see how to use the plug-in's functions. There is also a function and script step reference available.
If you have problems
This user guide tries to give you all the information necessary to use this plug-in. So if you have a problem please read this user guide first. You can also visit our support web page:
www.troi.com/support
This page contains FAQ's (Frequently Asked Questions), help on registration and much more. If that doesn't help you can get free support by email. Send your questions to support@troi.com with a full explanation of the problem. Also give as much relevant information (version of the plug-in, which platform, version of the operating system, version of FileMaker Pro) as possible. Note that due to spam we have to filter incoming email. It might happen that non-spam email is filtered out too. If you have sent an email and you don't get an answer, try to send another email, slightly differently formulated and include the word "FileMaker" in the body text.
If you find any mistakes in this manual or have a suggestion please let us know. We appreciate your feedback!
TIP You can get more information on returned error codes from the OSErrrs database on our web site. This free FileMaker database lists all error codes for Windows and macOS!
What can this plug-in do?
Troi Text Plug-in is a very powerful tool for dealing efficiently with text in your FileMaker Pro database. All from within FileMaker you can:
- create combinational sets from 2 text fields:
- get all lines that are the same
- get all lines that differ
- and other combinations
- get (unique) lines and sort words and lines
- parse XML Text
- check spelling via calculations
- and more...
Software requirements
System requirements for macOS
- macOS 10.13 (High Sierra)
- macOS 10.14 (Mojave)
- macOS 10.15 (Catalina)
- macOS 11 (Big Sur) including 11.6
- macOS 12 (Monterey)
NOTE Troi Text Plug-in 5.0 will probably run on OS X 10.12 (Sierra) , but we have not tested this and no longer provide support for this.
System requirements for Windows
- Windows 8 and 8.1
- Windows 10 including these updates:
- Creators Update
- Fall Creators Update
- April 2018 Update
- October 2018 Update
- May 2019 Update
- November 2019 Update
- May 2020 Update
- October 2020 Update
- May 2021 Update
- Windows 11
FileMaker Pro requirements
FileMaker Pro 16 or FileMaker Pro Advanced 16
FileMaker Pro Advanced 17
FileMaker Pro Advanced 18
FileMaker Pro 19, including FileMaker Pro 19.4
FileMaker Server requirements
FileMaker Server 16
FileMaker Server 17
FileMaker Server 18
FileMaker Server 19
FileMaker Cloud
We no longer support a version for FileMaker Cloud.
You can use FileMaker Server to serve databases that use functions of Troi Text Plug-in (client-side): you need to have the plug-in installed at the clients that use these functions.
Troi Text Plug-in can also be used by FileMaker Server as a server-side plug-in or as a plug-in used by the web publishing engine. To use Troi Plug-ins as a server-side or web-side plug-in you need to purchase a special Server/Web license. More information can be found in the download or on our web site .
Getting started
Using external functions
Troi Text Plug-in adds new functions to the standard functions that are available in FileMaker Pro. The functions added by a plug-in are called external functions. You can see those extra functions for all plug-ins at the top right of the Specify Calculation box:
You use special syntax with external functions: FunctionName ( parameter1 ; parameter 2 ) where FunctionName is the name of an external function. A function can have zero or more parameters. Each parameter is separated by a semi-colon. Plug-ins don't work directly after installation. To access a plug-in's function, you need to add the calls to the function in a calculation, for example in a text calculation in Define Fields or in a script in Script Workspace (formaly called ScriptMaker).
Where to add the external functions?
External functions for this plug-in can be used in a calculation field when you are defining fields (choose Define Database from the File menu). Also the plug-in's functions can be used in a script step using a calculation, for example in a Set Field script step.
Using script steps
Plug-ins can also add script steps . You can select these script steps in the script steps pane in Script Workspace, or you can begin typing the script step name, then choose the script step from the list that appears. The script steps expand the possible actions you can perform with FileMaker Pro.
screenshot of Troi File Plug-in script step
NOTE only steps that perform an action have been added as a script step. Functions that have no side effects (like for example TrText_ANDText) are only available as an external function.
Simple example
We start with a simple example to get you going. Say you have a database Pages.fmp12, with a text field called myText. You want to list al unique words from myText. Go to Define Fields and define this calculation:
myUniqueWords Calculation = TrText_UniqueWords ( "-Unused" ; myText )
Put the newly created calculation field on the layout.
If the contents of myText is "An ape is an ape, a rose is a rose" myUniqueWords will contain:
An
Ape
Is
A
Rose
Please take a close look at the included example files, as they provide a great starting point. From there you can move on, using the functions of the plug-in as building blocks. Together they give you powerful text tools.
You can use globals or variables
With the release of FileMaker Pro 8 and later it is possible to use variables in calculations. Our example files in the download now both use global fields and variables to pass parameters and store the results of a plug-in function.
As this release of Troi Text is intended for FileMaker Pro 16 and higher, we continue to move the scripts to use variables wherever possible. Note that not all examples are using variables yet.
All plug-in functions work with variables just fine. For example if you have this script step
Set Field [ myResultField ; TrText_UniqueWords ( "-Unused" ; myText ) ]
With variables you can alternatively use:
Set Variable [ $myResult ; TrText_UniqueWords ( "-Unused" ; myText ) ]
The main advantage of variables is that you don't need to define global fields that clutter your database definitions. The variables can stay local to the script.
Function and script step reference
For a description of all External Functions and External Script Steps added by Troi Text Plug-in please see the separate Reference.fmp12 file. For each function and script step you will find:
- the correct syntax
- the parameters/options to be used
- the returned result
- special considerations
- an example usage
The same information is also available as online help on Troi's web site.
You can easily consult the online help directly from FileMaker, by clicking the Help button (the small question mark button) next to the function description in the functions pane or the script step description in the script steps pane.
|