Change the behavior of variables with scripts - Author-it On-Premises

Author-it Plugins Guide

The Metadata plugin allows you to use scripts to change the behaviour of variables. Add IronPython scripts to the <ValueChangedScript> and <LovScript> elements in the plugin's configuration file. Finish the script with a call to the SetMetadataValue() (for single-value variables) or SetMetadataLoV() (for multi-value-variables).

Available Functions

Function

Description

Parameters

SetMetadataValue()

Assigns a value to a variable.

  • metadataName: the name of the variable (string).

  • metadataValue: the value to be assigned.

GetMetadataValue()

Returns the value assigned to a variable.

metadataName: the name of the variable (string).

ReloadMetadataLoV()

Reloads the values of a list-of-values variable displayed in the metadata panel.

metadataName: the name of the variable (string).

SetMetadataLoV()

Assigns values to a list-of-values variable.

  • metadataName: the name of the variable (string).

  • lovList: (list of strings).

For examples, see Example configuration.