Calculated task fields: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
Line 1: Line 1:
Calculated fields are a type of [[custom task fields]] in Planfix. A [[Standard functions | formula]] is specified in the calculated field's settings, by which the field values are calculated.
{{#seo:
|title=Calculated task fields
|titlemode=append
|keywords=planfix, calculated task fields, user fields
|description=Calculated task fields
}}
A calculated field is a [[Custom task fields |custom task fields]] that lets you calculate a value you need, using data from various Planfix objects and [[Standard functions| standard Planfix functions]].


Calculated fields currently support the following system objects:
*[[#Formula Calculation — "Number" Result|Formula Calculation — "Number" Result]]
*[[#Formula Calculation — "String" Result|Formula Calculation — "String" Result]]
*[[#Calculated field with a "Text with variables" result type.|"Text with Variables"]]




*[[Calculated task fields]]
==Formula Calculation — "Number" Result==
*[[Calculated data tag fields]]
The fundamental aspect of the calculated field is determined by the formula used to calculate its value:
*[[Calculated contact fields]]
 
"https://p.pfx.so/pf/WR/XbIBzG.png">https://p.pfx.so/pf/WR/XbIBzG.png</a>;
 
You can also choose the format in which the value of the calculated field will be stored:
 
<a href="https://p.pfx.so/pf/IV/y6GxCi.png">https://p.pfx.so/pf/IV/y6GxCi.png</a>;
 
 
==Formula Calculation — "String" Result ==
*Output '''data from variables''' to the field:
<pre>+</pre>
<a href="https://p.pfx.so/pf/dk/VEd9ov.png">https://p.pfx.so/pf/dk/VEd9ov.png</a>;
 
 
*Output '''text and data from variable''' to the field:
<pre>"Task Name:"+" "+{{Task.Parent task.Name}}</pre>
<a href="https://p.pfx.so/pf/0H/nBsqWn.png">https://p.pfx.so/pf/0H/nBsqWn.png</a>;
 
 
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
 
<a href="https://p.pfx.so/pf/Fz/uEXIGa.png">https://p.pfx.so/pf/Fz/uEXIGa.png</a>;
 
 
As the result, we get the concatenation of "Sum: ", "50" and "70":
 
<a href="https://p.pfx.so/pf/MC/uFIwZ4.png">https://p.pfx.so/pf/MC/uFIwZ4.png</a>;
 
 
And if you add brackets — the numbers are summed:
string + (number + number) = string + sum of numbers = string
 
<a href="https://p.pfx.so/pf/3J/IfPMWO.png">https://p.pfx.so/pf/3J/IfPMWO.png</a>;
 
<a href="https://p.pfx.so/pf/Sl/DXTP5v.png">https://p.pfx.so/pf/Sl/DXTP5v.png</a>;
 
 
== 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 ===
<a href="https://p.pfx.so/pf/oj/kZW041.png">https://p.pfx.so/pf/oj/kZW041.png</a>;
 
<a href="https://p.pfx.so/pf/uI/3CAtvK.png">https://p.pfx.so/pf/uI/3CAtvK.png</a>;
 
 
=== Example № 2 ===
<a href="https://p.pfx.so/pf/VK/gpj3tC.png">https://p.pfx.so/pf/VK/gpj3tC.png</a>;
 
<a href="https://p.pfx.so/pf/57/HCQwD2.png">https://p.pfx.so/pf/57/HCQwD2.png</a>;
 
 
== Important ==
*Calculated fields are calculated when a task is created or modified. 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.
*Calculated fields are not calculated in tasks with the status Draft. 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|automatic 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 [https://planfix.ru/prices/ package] you are using.
*If you are using HTML markup, remember:
**If you need double quotes — use the [[CHAR function|SYMBOL]] function." = SYMBOL(34).
**Using line breaks within quote strings is not supported — enter the data in a string.
 
 
== Useful links ==
*[<a href="https://planfix.com/ru/blog/vychislyaemye-polya-zadach/">https://planfix.com/ru/blog/vychislyaemye-polya-zadach/</a>; Note about computed task fields in the Planfix blog]
*[[Text with Variables|Text with Variables]]




== Go To ==
== Go To ==
*[[Calculated fields]]
*[[Types of custom fields]]== Go To ==
*[[Types of custom fields]]
*[[Types of custom fields]]
*[[Feature Description]]
*[[Feature Description]]

Revision as of 13:33, 5 January 2024

A calculated field is a custom task fields that lets you calculate a value you need, 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:

"XbIBzG.png">XbIBzG.png</a>;

You can also choose the format in which the value of the calculated field will be stored:

<a href="y6GxCi.png">y6GxCi.png</a>;


Formula Calculation — "String" Result

  • Output data from variables to the field:
+

<a href="VEd9ov.png">VEd9ov.png</a>;


  • Output text and data from variable to the field:
"Task Name:"+" "+{{Task.Parent task.Name}}

<a href="nBsqWn.png">nBsqWn.png</a>;


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

<a href="uEXIGa.png">uEXIGa.png</a>;


As the result, we get the concatenation of "Sum: ", "50" and "70":

<a href="uFIwZ4.png">uFIwZ4.png</a>;


And if you add brackets — the numbers are summed:

string + (number + number) = string + sum of numbers = string

<a href="IfPMWO.png">IfPMWO.png</a>;

<a href="DXTP5v.png">DXTP5v.png</a>;


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

<a href="kZW041.png">kZW041.png</a>;

<a href="3CAtvK.png">3CAtvK.png</a>;


Example № 2

<a href="gpj3tC.png">gpj3tC.png</a>;

<a href="HCQwD2.png">HCQwD2.png</a>;


Important

  • Calculated fields are calculated when a task is created or modified. 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.
  • Calculated fields are not calculated in tasks with the status Draft. 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 automatic 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 package 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 a string.


Useful links


Go To