Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleHow does the Lua script get access to the fields

To get programatic access of the values of the custom fields, there is this api call:

Code Block
languagelua
local Fields = component.fields();

This returns a Lua table with the custom fields and their values for the component.

Expand
titleHot to programmatically modify an existing custom field to set a new value

You can use the component.setField{} API.

Expand
titleWhere are the custom field values defined for each component

Custom Field values set in the component card are stored locally in an encrypted file.

Code Block
<instance root>/IguanaX/configurations/fields/<component guid>.
json

For example:

Code Block
language
json
{
    "fields": {
        "Folder": "/Folder/",
        "Number": "1e3",
        "Password": "4E4D90C9F91E21FCD59F9F31D88F71FB",
        "Port": "64000",
        "String": "A String"
    }
}

See Custom Fields Configuration File for more information.

Expand
titleWhat is the format of config.json - the definition for the fields and default values in each component

This is what the format looks like:

Code Block
languagejson
{
    "fields": [
        {
            "default": "/ff/",
            "name": "Folder",
            "type": "folder"
        },
        {
            "default": "fdsf",
            "name": "File",
            "type": "file"
        },
        {
            "default": "",
            "name": "String",
            "type": "string"
        },
        {
            "default": "1",
            "name": "Number",
            "type": "number"
        },
        {
            "default": "true",
            "name": "Boolean",
            "type": "bool"
        },
        {
            "default": "",
            "name": "Password",
            "type": "password"
        },
        {
            "default": "",
            "name": "Port",
            "type": "port"
        }
    ]
}

...