Guide to Updating Plug-ins

|
External functions 11
FMSAUC_ FindPlugIn
Format FMSAUC_FindPlugIn("plug-in-name")
Parameters plug-in-name – the name of the plug-in file. The parameter must be enclosed
in quotes.
Data type returned Text
Description This function returns a string listing the plug-in versions located in the
FileMaker Server AutoUpdate folder or the default database folder. If the plug-
in can’t be found, the function returns –1 (negative
1).
FileMaker Server looks for the plug-in in two places. First, it searches the
AutoUpdate folder located in the same folder that contains the hosted database.
If the file is not found there, it searches for an AutoUpdate folder located in the
FileMaker Server default database folder.
Example The following example shows how to specify the external function
FMSAUC_FindPlugIn within a Set Field script step. The Set Field script step
allows you to return the result of a calculation in a single field. For more
information about script steps and FileMaker Pro functions, see the FileMaker
Pro onscreen Help.
Set Field [dbname::Remote_Version;
FMSAUC_FindPlugIn("SamplePlugIn")]
This example returns versions in the following format:
1.0 1.2 1.5 2.0 3.3...
FMSAUC_UpdatePlugIn
Format FMSAUC_UpdatePlugIn("plug-in-name version")
Parameters plug-in-name version – the name of the plug-in or support file that you
want to download and the plug-in version number. The parameter must be
enclosed in quotes.
Note There must be a space between the plug-in name and the version number.
Data type returned Text
Description This function downloads the specified plug-in or support file from the server
computer to the client computer. FileMaker Server looks for the plug-in in two
places. First, it searches the AutoUpdate folder located in the same folder that
contains the hosted database. If the file is not found there, it searches for an
AutoUpdate folder located in the FileMaker Server default database folder.
Example FMS_UpdatePlugIn("SamplePlugIn 1.5").
If there is a file with the same name in the client’s Extensions folder, it is moved
to the Extensions\Saved folder. If this file is a plug-in, it is disabled in FileMaker
Pro before it is moved. The newly downloaded file is then copied to the
Extensions folder and enabled, if the downloaded file is a plug-in.
If the file successfully downloads, the function returns 0 (zero). Otherwise, the
function returns an error code listed in the following table.