Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Create a function field to perform a database function

Create a function field that displays the results of a database function, such as a mathematical operation, field length computation, or day of the week calculation.

Before you begin

Role required: admin

You can either select a function field from a physical table or create a function field directly on the database view.

If you create a function field directly on the database view, you must use the variable prefixes from the database view in the function definition to identify the columns. Before you create the function field, take note of the variable prefixes in your database view.

For example, if the variable prefix for the Incidents table is inc2 and you want to return the length of the description field, the function definition would be glidefunction:length(inc2_description). If the variable prefix for the Metric Instance table is mi and you want to concatenate the Definition and Value fields, the function definition would be glidefunction:concat(mi_definition.name,' ',mi_value).

For information on supported functions, see Report on function fields.

Procedure

  1. Navigate to All > System Definition > Dictionary.

  2. Select New.

  3. Select Function field.

  4. On the form, fill in the fields.

FieldDescription
TableThe table or database view to which the function field is added.If you select a database view, you must include the database view's variable prefixes in the Function definition field.
TypeThe type of field: string, number, date, and so on.
Column labelThe label for the column.
Column nameThe name of the column. This field is automatically set to the value of the Column label field.
Max lengthThe maximum length of the return value.
Function fieldIf selected, creates a field that displays the results of a database function, such as a mathematical operation, field length computation, or day of the week calculation.Once the new function record is saved, you cannot clear the check box to make the field a regular field.
Function definition

The function that the field performs.The format for functions starts with glidefunction:, followed by the operation to be performed (for example, concat), followed by function parameters. Constants must be enclosed in single quotes.

Important: If you create the function field on a database view and not a physical table, you must include the database view's variable prefixes in the Function definition field.

  1. Select Submit.

Create a Function field on the Incident Metric database view

In this example, a new Function field, CallerDesc, is added to the Incident Metric database view. The field concatenates the caller name, a hyphen, and the short description.

Image omitted: FunctionFieldDatabaseView.png
Function field on the Incident Metric database view

The variable prefix inc is included because the function field is defined on the Incident Metric database view and not on a physical table. The prefix is necessary to distinguish which short_description and caller_id columns to use from the tables that are part of the database view.

What to do next

Display function results in a database view

Parent Topic:Displaying function results in a database view