Skip to main content

TrFile_Version (function reference)

Troi File Plug-in for FileMaker Pro

TrFile_Version

Use this function to see which version of the plug-in is loaded.
Note: This function is also used to register the plug-in.

SyntaxFunction badge

TrFile_Version ( switches )

Parameters

switches determine the behavior of the function

Switches

switches can be one of this:

-GetVersionString the version string is returned (default)
-GetVersionNumber returns the version number of the plug-in
-ShowFlashDialog shows the Flash Dialog of the plug-in (returns 0)
-GetPluginInstallPath returns the path where the plug-in is installed
-GetRegistrationState get the registration state of the plug-in: 0 = not registered ; 1 = registered
-UnregisterPlugin sets the registration state of the plug-in to unregistered
-GetStartupRegistrationLog returns a text log of the plug-in’s registration process at startup time of FileMaker

If you leave the parameter empty the version string is returned.

Returned Result

Data type returned

Text

Result

The function returns ? if this plug-in is not loaded. If the plug-in is loaded the result depends on the input parameter. It is either a:

VersionString:
If you asked for the version string it will return for example “Troi File Plug-in 12.0”

VersionNumber:
If you asked for the version number it returns the version number of the plug-in x 1000. For example version 12.0 will return number 12000.

-ShowFlashDialogResult:
This will show the flash dialog and then return the error code 0.

-GetRegistrationState:
returns 0 = the plug-in is not registered ; 1 = the plug-in is registered.

-GetStartupRegistrationLog:
returns a text log of the plug-in’s registration process at startup time of FileMaker.

Originated in

Troi File Plug-in 1.0

Compatibility

FileMaker Pro 16 to FileMaker Pro 2023

Considerations

IMPORTANT always use this function to determine if the plug-in is loaded. If the plug-in is not loaded use of external functions may result in data loss, as FileMaker will return an empty field to any external function that is not loaded.

version 15.0 added the switch “-GetStartupRegistrationLog”. This will return a text log of the plug-in’s registration process at startup time of FileMaker Pro. When you have problems registering the plug-in, you can see if the payment certificate was found and if a valid registration code was found.

Example

We assume that a calculation number field cVersion is defined like this:

cVersion = TrFile_Version

This will evaluate to “Troi File Plug-in <version number>”. For version 12.0 this will be: “Troi File Plug-in 12.0”.

Example 2

TrFile_Version ( "-GetVersionNumber" )

will return 12000 for version 12.0

TrFile_Version ( "-GetVersionNumber" )

will return 9010 for version 9.0.1

So for example to use a feature introduced with version 9.1 test if the result is equal or greater than 9100.

Used in example file

Version.fmp12

Related functionFunction badge

TrFile_VersionAutoUpdate

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 16 to 2023 –> TrFile_Version (filep9001) 2023-0601 16:41:46