Create a function field to perform a database function

  • Rversion finale: Australia
  • Mis à jour 12 mars 2026
  • 2 minutes de lecture
  • 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.

    Avant de commencer

    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.

    Procédure

    1. Navigate to All > System Definition > Dictionary.
    2. Select New.
    3. Select Function field.
    4. On the form, fill in the fields.
      Tableau 1. Function fields form
      Field Description
      Table The 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.

      Type The type of field: string, number, date, and so on.
      Column label The label for the column.
      Column name The name of the column. This field is automatically set to the value of the Column label field.
      Max length The maximum length of the return value.
      Function field If 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.
    5. 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.

    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.

    Que faire ensuite

    Display function results in a database view