Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3    Statistic  

Register

This function is used to register the Plugin.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Plugin 1.0 Yes Yes Yes Yes Yes

MBS( "Register"; Licensee Name; component; License Type; Expire Month; Serial number )

Parameters

Parameter Description Example value
Licensee Name This is the name of the person or organization that holds the license for the plug-in Your Name
component The component that was licensed. For example "Complete"
License Type Seats purchased. For example, "1 seat", "10 seats", "Developer" 1 Seat
Expire Month This is the month in which the serial will expire for new versions of the plug-in in YYYYMM format. Plug-in released before the end of that month will continue to work forever. New Releases after that date will require a renewal 200708
Serial number The license number your serial number

Result

Returns OK on success.

Description

This function is used to register the Plugin.
If you use Server and Client licenses, be sure to register the right license for the right type.
e.g. in your script detect if you are on the server or not.
Before you register, you may want to check if already is registered.

See also StoreRegistration, IsRegistration, IsRuntime, IsServer and IsClient functions.

Examples

Register only when needed:

If [MBS("IsRegistered") ≠1]
    If [MBS("IsRuntime")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Runtime"; 123; 123)]
    Else If [MBS("IsMobile")]
        Set Variable [$r; Value:MBS("Register"; "test"; "iOS"; 123; 123)]
    Else If [MBS("IsServer")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Server"; 123; 123)]
    Else
        Set Variable [$r; Value:MBS("Register"; "test"; "5 seats"; 123; 123)]
    End If
End If

Register with license values in a text field:

Set Variable [ $result ; Valeur: Evaluation("MBS(\"Register\"; " & Register::License & ")") ]

Register with Startup script for server and client:

Startup Script:

#Register for client
Perform Script [“InitMBS”]
#Register for server. Will be ignored if no server or no plugin installed on server
Perform Script on Server [“InitMBS”]


InitMBS script:

#Enable debug logging. Shows messages in DebugView/Console.app
Set Variable [$r; Value:MBS("Trace")]
#Register if needed for right platform
If [MBS("IsRegistered") = 0]
    If [MBS("IsRuntime")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Complete"; "Runtime"; 123; 123)]
    Else If [MBS("IsServer")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Complete"; "Server"; 123; 123)]
    Else If [MBS("IsClient")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Complete"; "5 Seats"; 123; 123)]
    Else
        Set Variable [$r; Value:"Unknown platform: " & MBS("Platform")]
    End If
    #Show errors, so developer can fix them
    If [$r ≠ "OK"]
        Show Custom Dialog ["InitMBS failed."; $r]
    End If
End If
#May initialize other stuff
#like dynapdf with library in extensions folder
If [MBS("DynaPDF.IsInitialized") = 0]
    Set Variable [$DynaPDFLicense; Value:"1003637-16022016-3-8-12-685C57F..."]
    If [MBS("IsWindows")]
        Set Variable [$r; Value:MBS( "DynaPDF.Initialize"; "dynapdf.dll"; $DynaPDFLicense)]
    Else If [MBS("IsMacOSX")]
        Set Variable [$r; Value:MBS( "DynaPDF.Initialize"; "dynapdf.dylib"; $DynaPDFLicense)]
    Else
        Set Variable [$r; Value:"Unknown platform: " & MBS("Platform")]
    End If
    #Show errors, so developer can fix them
    If [$r ≠ "OK"]
        Show Custom Dialog ["InitMBS failed."; $r]
    End If
End If

See also


RegEx.Version   -   Registration

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins