Dynamic field formulas

General

With Dynamic Field Formulas, you can for example count values, create conditional clauses, edit fields’ information, etc. within a single CRM-service entity. With Dynamic Fields Formulas, you can also seek information from another module to the entity or count values for rows. It’s also possible to have a certain information field to show on the right side of the entity when the entity is opened and the condition is met.

Start

Management of dynamic field formulas can be found in the settings of each module, accessed by going to Settings → Module Manager and pressing the button for the desired module. The formulas themselves can be accessed from the Dynamic Field Formulas menu.

dynamic field formulas menu button

A new formula is created using the New formula button. The “Run” field specifies whether the formula is run, for example, when creating an entity, saving, or retrieving data from another field. The “Field” field is used to select the target field where the value will be stored. “The ‘Formula’ field defines the desired formula.

example of validation field formula

The new formula is activated by clicking the Activate option under the Actions header.

Actions Edit | Disable | Delete

Active formula which is run when the condition under the Run header is fulfilled.

Actions Edit | Activate | Delete

The disabled formula is marked with a red background.

Running the formulas

The formulas of dynamic fields are run when creating the entity, when information is fetched to other field, or between clicking the Save button and the actual saving to the database. The detail view formulas are checked when the entity is opened in CRM.

  • If the formula is run On save, the run is done every time the Save button is clicked after editing the entity.
  • If the formula is run On create, the run is done when the entity is first created.
  • If the formula is run On Validation, the run is done when the Save button is clicked. The formula then checks the content of the field and if the content is not valid, the formula displays a warning and interrupts saving the entity. A validation formula is done using this run option.
  • NOTE: On Field formulas work only in the legacy version of the system.

Things to consider when driving formulas

If the formula is run either “On save”, please note, that it is only run if the entity is saved in edit mode. Thus, the formula will not be run if the formula’s target field is edited with quick edit or mass edit, or data is imported to the field through CSV or integration.

With Run Formulas, you can run all the formulas at once for the module you are in. This enables for example updating information and editing from one field to another if there is for example a maintenance break. This function overwrites information in all existing entities in the module according to the formulas. You can run all the formulas for up to 5,000 entities at once.

The formulas are run in the order they are shown on the list. You can change the order by dragging formulas up and down on the list.

Limitations

  • Relation fields can’t be a target field of the dynamic field formula.
  • In modules that have row-level fields (e.g. Invoices, Sales Orders, Quotes), the information on rows can not be used in a dynamic formula for a main-level field or vice versa (read more about row-level formulas further below).

Limitations on row-level fields

  • The row-level fields’ formulas can be run only either “On save” or “On create”.
  • In row-level fields’ formulas, you can not fetch information from the fields in the main level (e.g. the quote’s name, due date, or other “normal” fields) or vice versa.

Dynamic Formulas in Row-Level Fields

You can also create dynamic formulas for row-level fields that e.g. quotes, sales orders, and invoices have. This feature isn’t enabled by default, but you can activate it in Settings → Additional Settings by activating Enable inventory row field formulas field in Row-Level Functions.

 

Formula types

Information formula

Information formulas allow the system to provide users with a notification that is activated if a condition specified in the formula is met.

The notifications are divided into four different types and the user can change the text to whatever suits the situation best:

Danger:

red triangle with exclamation mark symbol and text: customer does not have any contact details

Warning:

bell symbol and text: customer does not have any contact details

Information:

i inside a circle and text: Customer does not have any contact details

Success:

Thumbs up symbol and text: Customer's contact information is complete

Validation formula

Validation formulas can be used, for example, to ensure that the value entered in a field matches the criteria set for it. Criteria can be, for example, the length of the value to be entered or the possibility to enter only a numeric value. Validation formulas can also be used, for example, to prevent the creation of entities with the same name in a module – such formulas can be used, for example, to prevent the creation of two account entities with the same name.

Schedule dynamic field formulas

Formulas can be scheduled and run in the background for example to do calculations without opening and saving the entity. Learn more about how to do scheduled field formulas from here: Scheduled Tasks.

Formulas triggering on workflow

The combination of workflow and dynamic field formulas allows users to update data outside the saved entity. More information on this is available in the Update information to linked entity.

Examples of formulas

We have collected information about writing field formulas and the most commonly used formulas in our article Examples of dynamic field formulas.

Portal Settings
Configuring the CRM2 layout
Process diagram
Field name variants Legacy vs REST/CRM2
Formatted Text Area
Dynamic field formulas
Combined Shape