Calculated task fields: Difference between revisions
From Planfix
No edit summary |
No edit summary Tag: Manual revert |
||
(2 intermediate revisions by the same user not shown) | |||
Line 77: | Line 77: | ||
== Useful links == | == Useful links == | ||
*[[Variables in Text|Text with Variables]] | *[[Variables in Text|Text with Variables]] | ||
==Tip== | |||
*If you rename a field, update the new name in the variable; otherwise the variable with the old name will not work in the calculated field. | |||
Latest revision as of 12:00, 22 November 2024
A calculated field is a custom task fields that lets you calculate a value, using data from various Planfix objects and standard Planfix functions.
Formula Calculation — "Number" Result
The fundamental aspect of the calculated field is determined by the formula used to calculate its value:
You can also choose the format in which the value of the calculated field will be stored:
Formula Calculation — "String" Result
- Output data from variables to the field:
{{variable_1}}+{{variable_2}}
- Output text and data from variable to the field:
"Task Name:"+" "+{{Task.Name}}
Please note that text and spaces must be enclosed in double quotes.
- Round brackets in calculates field with "String" result type:
A simple rule applies:
string + number + number = string
As the result, we get the concatenation of "Sum: ", "50" and "70":
And if you add brackets — the numbers are summed:
string + (number + number) = string + sum of numbers = string
Calculated field with a "Text with variables" result type.
Text with variables has the following capabilities:
- You can immediately get an idea of how the field will roughly look.
- The values will replace the variables.
- You can apply formatting from the built-in editor:
- Change appearance
- Display on a new line.
- Add a table, link or Planfix object using the corresponding editor buttons.
Example № 1
Example № 2
Important
- The value of the calculated field is calculated when a task is created. The value of the calculated task field is only recalculated if the values of the fields of this task, which are contained in the formula by which the field is calculated, are changed.
- In tasks with a draft status, calculated fields are not calculated. The values are calculated when the task is changed to one of the working statuses.
- Formulas for calculated fields can contain values from other calculated fields.
- If a reference to the current time or date is used in the formula, changing the field containing the formula does not trigger the execution of scripts. This limitation is part of the mechanism to protect against looping and unlimited load.
- The maximum number of calculated fields that can be added to the account is limited by the plan you are using.
- If you are using HTML markup, remember:
- If you need double quotes — use the SYMBOL function." = SYMBOL(34).
- Using line breaks within quote strings is not supported — enter the data in one string.
Useful links
Tip
- If you rename a field, update the new name in the variable; otherwise the variable with the old name will not work in the calculated field.