Skip to main content

Encr_Version (function reference)

By April 20, 2023April 25th, 2023Online Help, Troi Encryptor Plug-in
Troi Encryptor Plug-in for FileMaker Pro

Encr_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

Encr_Version ( switches )

Parameters

switches determines 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
-GetPluginInstallPath returns the path where the plug-in is installed
-ShowFlashDialog shows the Flash Dialog of the plug-in (returns 0)
-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

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 Encryptor Plug-in 7.0”

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

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

Originated in

Troi Encryptor Plug-in 1.2

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.

Example

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

cVersion = Encr_Version

This will evaluate to “Troi Encryptor Plug-in <version number>”. This currently returns “Troi Encryptor Plug-in 7.0”.

Example 2

Encr_Version ( "-GetVersionNumber" )

will return 2600 for version 2.6

Encr_Version ( "-GetVersionNumber" )

will return 2510 for version 2.5.1

Encr_Version ( "-GetVersionNumber" )

will return 7000 for version 7.0.

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

Used in example file

Version.fmp12

Related functionFunction badge

Encr_VersionAutoUpdate

Related topics

Troi Encryptor Plug-in online help (overview)


Online Help Page for Troi Encryptor Plug-in for 16 to 2023 –> Encr_Version (encrp9001) 2023-0425 16:02:28