GetAddonInfo

Returns a JSON object with information about an add-on.

Format 

GetAddonInfo ( addonID )

Parameters 

addonID - text that specifies the Universally Unique Identifier (UUID) of an installed or packaged add-on.

Data type returned 

text

Originated in version 

19.2.2

Description 

This function searches for an add-on whose UUID matches the addonID parameter and returns information about the add-on. The search includes:

  • installed add-ons, which are in the current file

  • packaged add-ons, which aren't currently installed but are available to FileMaker Pro to be installed

If you're developing an add-on, you can use this function to get information at runtime about installed and packaged add-ons. For example, you can use the GetLayoutObjectOwnerInfo function to get the ID of the add-on that contains a given layout object, then pass that add-on ID to this function to get the add-on's name.

In the following example of the returned JSON object, the specified add-on was installed from the packaged add-on named "People" and renamed "Renamed People."

Copy
{
    "APIVers" : 2,
    "Installed"
    {
        "Name" : "Renamed People",
        "UUID" : "B79DDD6D-DDF2-4370-A3C9-F9DEF2C52992",
        "UsesLayoutPayload" : 1,
        "UsesRelationship" : 1
    },
    "Package"
    {
        "Name" : "People",
        "UUID" : "3CB70E8B-B45E-4EF1-B2DD-8CA7DDB3CDC1"
    }
}

The following table describes the elements in the returned JSON object.

JSON element

Description

APIVers

Numeric value for the version of this JSON object's structure. If the structure of this JSON object changes in a subsequent release, this number will change.

Version 2 (v19.3.1): Added UsesLayoutPayload and UsesRelationship.

Installed

Object describing the add-on, if installed. Includes these keys:

  • Name – Add-on's name

  • UUID – Add-on's UUID

  • UsesLayoutPayload – Boolean that indicates whether the add-on adds layout objects when dragged to the current layout.

  • UsesRelationship – Boolean that indicates whether the add-on creates a relationship with the current table occurrence.

Package

Object describing the packaged add-on. Includes these keys:

  • Name – Add-on's name

  • UUID – Add-on's UUID

Example 1 

Returns the JSON object shown above.

Copy
GetAddonInfo ( "B79DDD6D-DDF2-4370-A3C9-F9DEF2C52992" )