Computed Fields

Automate calculations and dynamic content generation


Computed fields

automatically generate values based on data in other fields.

They help you perform calculations, format dynamic text, and calculate dates or selections without manual input - similar to spreadsheet formulas.

This guide explains each computed field type and shows you how to set them up.

Computed fields enable you to:

Perform Calculations (Computed Number):
  • Build messages or descriptions by inserting field values into templates.
  • Example: "Order for $CUSTOMER_NAME totaling $$AMOUNT" might display as: "Order for John Doe totalling $150.00."
Create Dynamic Text (Computed Text):
  • Build messages or descriptions by inserting field values into templates.
  • Example: "Order for $CUSTOMER_NAME totaling $$AMOUNT" might display as: "Order for John Doe totalling $150.00."
Calculate Dates (Computed Date):
  • Automatically compute dates or durations.
  • Example: $START_DATE + 30 Days adds 30 days to a start date.
Select Options Automatically (Computed Select):
  • Determine an option based on other field values.
  • Example: IF($PRIORITY > 5, "High", "Normal") chooses a select option based on the priority field.
Lookup Fields
  • Lookup Fields copy values from a record in a linked collection , avoiding data duplication.
Aggregation Fields
  • Aggregation Fields summarise data (e.g., sum, average, count, minimum, or maximum) from related records in a linked collection.

How to Create a Computed Field

1. Open the Collection

  • Select the collection from the sidebar.


2. Go to 'Configure'

  • Click the ⋯ (options menu) in the top-right corner and select Configure, or
  • Right-click on the collection name in the sidebar and choose Configure.


3. Select 'Fields'

  • Under setup, click 'Fields' to see all existing fields.

You'll need Configure permissions

to adjust collection settings. If you're unsure, ask your System Admin.


4. Add a Computed Field

  • Click “+ Add Field”: Start adding a new field.
  • Select the Field Type: In the Type dropdown, choose one of: - Computed (Text) - Computed (Number) - Computed (Date) - Computed (Select) - Or choose Lookup/ Aggregation for relational data.
    • Enter a Field Name: Provide a meaningful name (e.g., 'Total Cost' or 'Order Message').

For more detail on the different types of field you can use in Kinabase, see our guide on Field Types.


5. Write Your Formula or Template:

  • Using Field References: Reference other fields by using the $ symbol followed by the field name in ALL CAPS (replace spaces with underscores). Example: For a field named "Price", use $PRICE.
  • Arithmetic Operations: Use +, -, *, / with spaces around operators for clarity. Example: ($PRICE * $QUANTITY) - $DISCOUNT
  • Conditional Logic: Use the IF function for conditional output. Syntax: IF([condition], [result if true], [result if false])Example: IF($COST > 100, $COST * 0.9, $COST) applies a discount for high costs.
  • Handling Empty Values: Use the ?? operator to provide fallback values when a field is empty. Example: $DISCOUNT ?? 0 returns 0 if the discount field is null.
  • Computed Text Example:"Order for $CUSTOMER_NAME totaling $$TOTAL_AMOUNT" This template combines static text with dynamic field values.


6. Save The Field

  • Click 'Add Field' Your computed field is now saved. It will automatically update whenever the referenced fields change.


Tips for Using Computed Fields

  • Create test records to verify that your computed field returns the expected value.
  • Use parentheses to ensure operations occur in the correct order.
  • You can nest functions and operators for more complex logic.
  • Always reference fields in ALL CAPS with underscores replacing spaces, e.g., $FIRST_NAME.
  • In numeric computations, include units if needed (e.g., $MILEAGE * £3.50/mi).

By mastering Computed Fields, you can automate calculations and dynamic content generation within your Kinabase collections - streamlining data entry and ensuring consistency across your records.

If you have questions or need further assistance, our support team is here to help.