Function

Common features shared by all Functions. More info.

Parameters

Key Description Default value Possible values
name Name of the Function undefined Any string
_path Value that will persist through following Triggers. More info Incoming $_path value. Object
waitForUpdates If set to true, the Function will persist after it has been executed, until it is updated with a $kill:true parameter. false Any string, or _new|_previous|_all
_instance Specifies an existing instance that should be updated. If the instance does not exist, it will be created. More info: Updating Functions _new
kill If set to true, closes an open Function. undefined true|1
#_update Changes values in lists. Possible keys: add, remove, set, change. See explanation below.

Update parameters

The #_update parameter allows updating of parameters that are lists in the Function. These are the options.

Key Description
#_update.add Adds values to lists.
#_update.remove Removes values from lists.
#_update.set Adds or updates values in lists.
#_update.change Changes properties of objects in lists.

Each of the update operators (add, remove, set and change) take an object of lists, with parameter names as keys and a list of items to add/remove/update/change as values. E.g.: #_update.remove.myList: [{id:15},{id:20},{id:110}] removes the items with id 15, 20 and 110 from the list stored in the parameter myList. More info.

Outgoing Triggers

Event structure

Every outgoing Trigger from any Function contains a base set of properties. Specific Functions may add properties to this event, often depending on the event type. The base properties are listed below:

Key Description Possible values
type Trigger event type. Any of the Function's Trigger event types
_function Accessible internal data of the origin Function. Object with all parameters and their values.
_function.name (example) One of the Function parameters. The value of the parameter.
_path If not specifically altered, this will be passed on from Function to Function Object with custom properties and values.

Type: functionExecuted

Fires when the Function has completed its execution actions.

Additional event properties (besides the inherited properties):

Key Description Possible values
data Parameter values with which the Function was executed. object