Construct 3 icon

Construct 3

Documentation

Add/edit function dialog

Ashley's avatar
Medal
Construct Team Founder
Published 29 Apr, 2019
262 words
~1-2 mins

The add/edit function dialog appears when adding or editing a function.

This dialog has the following fields.

Name

The name of the function. Note that if the function is used as an expression (its Return type is not None), the name must be a valid expression, so cannot contain special characters or whitespace. Functions used as actions (with a Return type of None) can use any name.

Description Optional

An optional description of the function, for your organisational purposes. This is displayed in the Add action dialog or Expressions dictionary depending on the return type of the function, and can be a helpful reminder of what the function does.

Category Optional

An optional category for the function, for your organisational purposes. Functions with the same category are grouped together in the Add action dialog and Expressions dictionary, providing a way to arrange related functions together. This field autocompletes with existing category names used in the project, making it easier to use the same category names.

Return type

The return type of the function. This also determines whether the function is used as an action or an expression. Functions with a return type of None are used as actions; otherwise they are used as expressions. A return type of Any means the function can return either a number or a string. Functions with a return type must have a name which is a valid expression, so cannot contain special characters or whitespace.