Overview
Computed Fields and Roll-Up Fields are advanced field types that automatically calculate values based on your data, eliminating manual data entry and ensuring accuracy across your CRM.- Computed Fields use formulas to calculate values from other fields on the same record. For example, you can calculate a discount percentage, determine days until a deadline, or concatenate names into a full name field.
- Roll-Up Fields aggregate data from related records. For example, you can count the number of deals associated with an account, sum the total revenue from all opportunities, or find the most recent activity date across all contacts.
- Creating custom metrics and KPIs
- Automating calculations that drive business logic
- Aggregating data for reporting and analysis
Prerequisites
Before creating Computed or Roll-Up Fields, ensure you have:- Permission to manage custom fields in your organization
- Access to the object settings page for the object where you want to add the field (Contacts, Accounts, Opportunities, etc.)
- A clear understanding of which fields or related records you want to use in your calculation
- For Roll-Up Fields: existing relationships between the objects you want to aggregate
Step-by-Step Instructions
Creating a Computed Field
- Navigate to the object settings page for the object where you want to add the field (e.g., Contacts, Accounts, Opportunities).
- Click the Add field button and select Create computed field from the dropdown menu.
- Enter a Display name for your field (2-40 characters).
- Add an optional Description to help your team understand what this field calculates.
- Build your formula in the formula editor. The editor will show you:
- A text area where you can write your formula
- Available Functions tab showing mathematical, text, date, and logical functions you can use
- Available Fields tab showing all fields you can reference in your formula
- As you type your formula, watch the Preview result section below the editor. This shows you a live preview of how your formula will calculate, along with the result type (number, text, date, etc.).
- Use the Available Functions tab to explore functions by category. Click on any function to see its syntax, parameters, return type, and examples.
- Use the Available Fields tab to browse available fields. Click on any field to insert it into your formula. Fields are organized by object and field type for easy navigation.
- Optionally, check Pin field in object details page to make this field easily accessible in the details view.
- Click Save to create your computed field. The system will validate your formula and begin calculating values for all existing records.
Creating a Roll-Up Field
- Navigate to the object settings page for the object where you want to add the field.
- Click the Add field button and select Create rollup field from the dropdown menu.
- Enter a Display name for your field (2-40 characters).
- Add an optional Description to explain what this field aggregates.
- Select a Data source object type. This is the type of related records you want to aggregate (e.g., if you’re on Accounts and want to count Opportunities, select Opportunity). Note that you cannot select the same object type you’re currently on.
- Choose a Roll-up type from these options:
- Count: Count the number of related records
- Sum: Add up values from a numeric field
- Average: Calculate the average of a numeric field
- Minimum: Find the smallest value (works with numbers and dates)
- Maximum: Find the largest value (works with numbers and dates)
- If you selected Sum, Average, Minimum, or Maximum, select the Related field you want to aggregate. The dropdown will only show fields compatible with your chosen roll-up type.
- Optionally, add Filters to limit which related records are included in the calculation. For example, only count deals with a certain stage, or sum amounts above a threshold. You can combine multiple filters using AND or OR logic.
- Optionally, check Pin field in object details page for quick access.
- Click Save to create your roll-up field. The system will calculate values for all existing records based on their related data.
Troubleshooting / FAQs
My computed field shows a preview error. What should I check?
My computed field shows a preview error. What should I check?
- Your formula syntax is correct (check the function examples in the Available Functions tab)
- All field references exist and are spelled correctly
- The functions you’re using are compatible with your field types (e.g., mathematical functions require numeric fields)
Why can't I select certain fields for my roll-up?
Why can't I select certain fields for my roll-up?
Can I create a roll-up field that references the same object type?
Can I create a roll-up field that references the same object type?
What happens if I change a computed field formula that other fields depend on?
What happens if I change a computed field formula that other fields depend on?
How long does it take for computed and roll-up fields to calculate values?
How long does it take for computed and roll-up fields to calculate values?
Can I edit a computed or roll-up field after creating it?
Can I edit a computed or roll-up field after creating it?
What does pinning a field do?
What does pinning a field do?
How do I know what type of data my computed field will return?
How do I know what type of data my computed field will return?