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

Code Expression

Embedded Object Grooper.Core

Represents a runtime-evaluated code snippet that computes a value for use in expressions, data models, or automation.

Remarks

Overview

A Code Expression allows you to define custom logic using code that is evaluated at runtime. This enables dynamic calculation of values based on fields, variables, or other context within your Data Model, Data Section, or Data Table.

How It Works

  • The 'Expression' property contains the code to be evaluated.
  • The expression can reference fields, variables, and built-in functions available in the current context.
  • The result is computed at runtime and can be used for extraction, validation, formatting, or automation.

Usage & Best Practices

  • Use code expressions to implement custom calculations, conditional logic, or data transformations.
  • Ensure that the expression is valid and references only available fields and variables.
  • Test expressions thoroughly to avoid runtime errors.
  • Review error messages in the log if evaluation fails.

> Note: This is an abstract base class. Use a derived type such as String Expression or Boolean Expression for specific value types.

Derived Types

There are 2 implementations of Code Expression.

Boolean Expression Computes a boolean value at runtime using a custom code expression.
String Expression Computes a string value at runtime using a custom code expression.
Notification