schema - data - calculated fields

  • Updated

Overview

Calculated Fields are configured to automatically compute and store logical or arithmetic values based on other Fields within the same Object. Neostella supports complex operations including arithmetic calculations, date manipulations, and conditional logic.

Use Calculated Fields to keep data updated automatically and to avoid errors when users manually fill Fields.

 

Required Permissions

  • Admin permissions are required to create or modify Field configurations in Schema -> Data.

 

Configuration Steps

  1. Navigate to the desired Object configuration and select the option to create a + NEW Field.
  2. Select Calculated Field from the Field Type dropdown menu.
  3. Select the required data output format from the Field Type Options dropdown menu:
  • CalculatedNumber if the expected result is a numeric value.
  • CalculatedDate if the expected result is a date.
  • CalculatedText if the expected result is a text string.
  1. Enter the required formula into the Calculated Expression text area.
  • Enclose all source Field references in double curly braces, such as {{field_selector}}.
  1. Click SAVE or SAVE AND CLOSE to apply the configuration.
Screenshot 2026-10-22 at 10.09.21.png

 

Composing Calculations

These expressions are constructed using a combination of Field References, Operators, and Functions. The available options depend on the selected Field type.

 

Arithmetic Operations

Addition +
Subtraction -
Multiplication *
Division /
Modulus %
Exponentiation ^

 

Numerical Functions

ROUND(field, decimals) Rounds the value up to 4 decimal places.
AVG(field1, field2, ...) Calculates the average of the provided Fields.
COUNT(field1, field2, ...) Counts the total number of provided Fields.
MIN(field1, field2, ...) Returns the minimum value among the provided Fields.
MAX(field1, field2, ...) Returns the maximum value among the provided Fields.

 

Age Calculation

Use the Age Function to compute the number of full years elapsed since a specific date. This function is only available when the Field Type Options is set to CalculatedNumber.

AGE(date_field) Returns the number of completed years between the specified date field and the current date. The calculation rounds down to the nearest whole year (e.g., 29 years and 11 months returns 29) and correctly accounts for leap years.

 

Date Operations

Use Date Functions to calculate durations or Project future dates.  

WORKDAYS(start_date, close_date) Returns the number of business days between two specific dates.
DATE_DIFF(start_date, close_date) Returns the number of calendar days between two specific dates.
ADD_BUSINESS_DAYS(date, n) Returns a new date by adding n business days to the specified date.
ADD_DAYS(date, n) Returns a new date by adding n calendar days to the specified date.
SUBTRACT_DAYS(date, n) Returns a new date by subtracting n calendar days from the specified date.

 

Conditional Logic

Logical Functions evaluate conditions and return specific values based on the result. 

The required format is IF(condition, true_value, false_value).  

 

Conditions are built using the following operators:

Comparisons

Less Than <
Greater Than >
Equal To =
Not Equal To !=
Less Than or Equal To <=
Greater Than or Equal To >=

 

Logical grouping

AND
OR

  

Example configuration: IF(DATE_DIFF({{Start_Date}}, {{Today}}) > 30, "Overdue", "On Time")

 

Dependencies

Calculated Fields depend on the values of the specific source Fields referenced within the expression.  

If a source Field value changes, all dependent Calculated Fields are automatically recalculated in the correct order to respect dependency chains. 

 

Limitations

  • Fields configured as a list (is_list) cannot be used as source Fields for Calculations.  
  • Existing Calculated Fields cannot be used as source Fields to build new Calculated Fields.
  • Calculated values are dependent on document write operations; users must save the record for the system to trigger the computation and calculate the saved value.
  • The system generates the calculation process asynchronously, meaning it may take a short time for the updated values to be reflected and appear on the record.

 

Validation

  • The system validates the syntax of the expression, the output, and the Field type correspondence before the configuration can be saved.

 

Expected Results

  • The newly calculated value is stored in the database and is immediately visible to the user.  
  • If a numerical Calculated Field produces a result with excess decimals, the system rounds the value after all mathematical operations are complete.

 

Troubleshooting

Null and Empty Values

Unexpected results may occur when source Fields contain null or empty values. The system applies the following rules:  

  • Null values are treated as zero (0) for addition and subtraction operations.  
  • If any operand is Null during multiplication or division, the result is returned as Null.  
  • The Calculated Field will display "N/A" or a custom message when a result cannot be computed due to missing values.