1. Home
  2. Administrators
  3. Formulas
  4. Calculate formulas only in some states

Calculate formulas only in some states

In Docuo, it is possible to use formulas to calculate the value of one or more data fields in a category.

The calculation of formulas is a costly process, since the system must retrieve the data necessary for the calculation (which in turn may be calculated by other formulas), for all documents in the category.

In categories with many documents, or with complex formulas, the calculation of formulas can lead to a degraded user experience, with long waiting and refresh times.

For a good user experience, reduce as much as possible the number of formulas in your Docuo categories, as well as their complexity. This will result in faster response times for your users.

When the number of formulas or their complexity cannot be reduced, and the category has a configured workflow (a process with several states), it is possible to reduce the total number of calculations by restricting the states in which the formula is calculated.

Configure the states in which the formula of a field is calculated

In the “Options” tab of the field, it is possible to set when the result of a formula should be calculated:

The default value is “Permanently”, but it is possible to change it to “In some states”. The latter is the recommended value for the best user experience.

In this example, we limit the calculation of the “Total” field of an offer to the “Creating” status (in creation), since in the offers Sent to customer, Accepted and Rejected, the price cannot be changed.

Thus, if 1,000 offers are stored in Docuo (100 being created, 200 sent to the customer, 400 accepted and 300 rejected), the system will only calculate and keep updated for the “Total” field, the values of the 100 offers that are being created.

The values of the remaining 900 bids will remain as they were calculated the last time they were found in the “In Creation” status, without being recalculated until they return to this status.

This simple configuration will decrease waiting times for users when working in this and any other related category.

Updated on 18 de December de 2023
Was this article helpful?

Related Articles