Create a function field to perform a database function
-
- UpdatedJan 30, 2025
- 3 minutes to read
- Yokohama
- Table Administration
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
Example: 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.
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