Home  >   Articles   >  Formula Fields
Articles in this section

Formula Fields

In tis article you will learn how to create and access Formula fields for CRM modules!
Shreya Kulkarni
21 Jun, 2022 - Updated 9 days ago
Table of Contents


Creating a formula means setting up a mathematical or any module specific rule for a module in order to attain a specific result. Vtiger CRM lets you create formula fields for CRM modules. Once a formula field is created for a module, the formula is applied by default every time you create new records or edit old records. Formula fields are also available for Custom modules. You can create a formula field from Settings >  Module Layouts & Fields settings. You can create a formula by selecting and evaluating the following: 

  • A module section’s fields or Vtiger Expressions or both.
  • The equation (formula) to be executed.

You can create a formula for the following data types:

  1. Text
  2. Decimal
  3. Integer
  4. Percent
  5. Date
  6. Textarea
  7. Time
  8. DateTime


The formula fields:

  • Allow all mathematical expressions available for workflow expressions.
  • Let you generate reports using the values .
  • Are not updated on import or export of records.

Benefits of Formula Fields

  • A formula field is auto-updated for created modules.
  • Facilitates quick and convenient mathematical calculations or rules.
  • Saves time for users.
  • Requires low implementation efforts.

Feature Availability

Editions →

Features ↓





Help Desk


Help Desk



Help Desk


Feature Availability

Formula Fields

Creating Formula Fields

In this section let us learn how to create formula fields in Vtiger CRM. In this instance,  we will be creating the formula field, Price, for the Invoices module. You can create a formula for any module.

Follow these steps to create a formula field:

  1. Login to your CRM account.
  2. Click the User Menu.
  3. Click Settings on the left corner of the screen.
  4. Look for Module Management.
  5. Click Module Layouts & Fields.
  6. Select a module for which you want to create a formula field - Invoices.
  7. Select a section for which you want to create a formula field - Item Details.
  8. Click +Add Custom Field. This will take you to the Create Custom Field window where you can create a formula field.
  1. Enter or select the below information:
  1. Select Field Type - Select Formula.
  2. Label Name - Enter a name for the formula Price.
  3. Max digits allowed - Enter the maximum digits you want to allow for the formula field 10.
  4. Decimals - Enter the number of decimals you want to allow for the formula field 2.
  5. Value data type - Select a suitable data type for the formula field Decimal.
  6. Expression - Select the fields and functions to be evaluated for the formula:
    1. Use Field - Select the fields to be evaluated, or, 
    2. Use Function - Select the functions to be evaluated. Or both if required.
    3. Enter the formula to be executed in the Expression box. For instance, we have selected the following:

1. Fields - Quantity and Unit Selling Price.
2. Function  - Roundoff(field, precision). This function is used to round off
  a number to the specified precision.

3. Formula - Quantity multiplied (*) by Unit Selling Price rounded off to 2
  decimal values. Hence the Formula is
roundoff(Quantity * Unit
  Selling Price,2)
4. Follow these steps to enter the formula roundoff(Quantity * Unit
  Selling Price,2)

a. Select the roundoff(field, precision) function.
b. Select Quantity, Unit Selling Price fields as field values.
c. Enter 2 as the precision value.
d. Enter Quantity * Unit Selling Price.

10. Click Save.

You have now successfully created the formula field Price for Invoices.


Once you create a formula field for a module, the formula field will be applied only to the following:

  • New records created and saved from then on.
  • Old records that are edited.

Accessing Formula Fields

In this section, let us learn how to access the formula fields you created.

Note: In this instance, we have considered the Invoices module and the Formula field, Price.

Follow these steps to access a formula field: 

  1. Log in to the CRM.
  2. Go to Inventory.
  3. Go to Order Fulfillment.
  4. Go to the Invoices module.

Note: The Formula Field will reflect in new or edited records. 

  1. Create an Invoice record with formula field details. For instance, we have created a tender record with Quantity 165 and Unit Selling Price 850.86.
  2. Click Save.
  3. Go to the Item Details section for which you have created the formula.

8. You can now view the created formula field Price in the chosen section.


Formula fields  created for:

  • Line item fields are applied at an individual line item row level.
  • Normal (other) fields are applied  at the record level.
Was this article helpful?
0  out of  0  found this helpful.
Comments 0
Be the first to comment
© Copyright 2022 Vtiger. All rights reserved.