Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Computed Field

Embedded Object Grooper.GPT

Defines a dynamic search field whose value is computed using an expression.

Remarks

The Computed Field object allows you to add custom, calculated fields to a search index in Grooper. These fields are not directly extracted from document data, but are instead generated at index time using a code expression. This enables you to include derived values, normalized data, or custom logic in your search index, supporting advanced search, filtering, and reporting scenarios.

Purpose and Usage

  • Use Computed Fields to add calculated or transformed values to your search index, such as totals, normalized strings, or custom flags.
  • Each computed field is defined by a name, data type, and an expression that determines its value.
  • Computed fields can be used for advanced filtering, sorting, or display in search results, and are especially useful when you need to index data that is not present as a direct field in your data model.

Configuration Guidance

  • Define a unique, code-friendly name for each computed field.
  • Select the appropriate data type and specify whether the field should be an array.
  • Write an expression that generates the value for the field, referencing other fields, variables, or built-in functions as needed.
  • Optionally, provide a description to clarify the field's purpose for other users or administrators.

Best Practices

  • Use descriptive names and document the purpose of each computed field in the 'Description' property.
  • Test expressions thoroughly to ensure correct results and error handling.
  • Use computed fields to encapsulate business logic, normalization, or derived values that enhance search and reporting.

Example Scenarios

  • Calculating a "Total Amount" field by summing line items in a document.
  • Creating a normalized "Customer Name" field for case-insensitive searching.
  • Generating a flag field that indicates whether a document meets certain criteria.

For more information on configuring search indexes and computed fields, see the documentation for Indexing Behavior and Data Model.

Properties

NameTypeDescription

Used By

Notification