Flavors of type "Formula" can be used to generate calculations between different numeric and date fields between system fields or other flavors. These calculations can be generated both at task level and project level (portfolio).
The formula flavors can be used for both simple and more complex formulas.
Think of a simple example: You have a custom field (flavor) for the "hours worked" along with a custom field (flavor) for the "hourly rate". With formula flavors, you can add these together and determine the billable revenue.
The corresponding formula (with pink formatting 😎) looks like this:
In addition, in the list view, an average or a sum can be calculated in each column with numerical values - including or without subtasks:
Using the formula editor
- The formula is entered in the uppermost field
- The result preview constantly checks the entered formula and outputs a result if possible
- Using the search field, you can search for available flavors and functions
- In the left column fields, flavors and functions are displayed, which are available in the workspace.
- In the right column of the lower area, a description and the syntax (especially relevant for functions) are shown.
Insertbutton can be used to insert fields, flavors and functions into the formula field if you don't want to type them yourself
Create a simple formula
- Create a flavor
- Open the flavor settings
- Choose the type
- In the formula editor, the values of the fields can be inserted via the drawer
- Choose a first value
- Set an operator (
- Choose a second value
Note: The current result is displayed in the result preview, provided that the formula was entered correctly.
- If everything looks OK, save the formula by clicking the
Formula flavors are edited and saved in a task in the flavor settings, but the formula applies equally to all tasks.
Formula flavors can currently be used with the following fields:
|actualcost||Actual cost of a task|
|cost||Planned cost of a task|
|duedate||Due date of a task/project|
|isProject||Returns 1 if the current object is a project, otherwise 0|
|isSubtask||Returns 1 if the current object is a subtask, otherwise 0|
|isTask||Returns 1 if the current object is a task, otherwise 0|
|startdate||Start date of a task/project|
Title of the current object
|today||Returns current date|
Custom fields (flavors)
In addition to the standard fields mentioned above, all flavors used in the workspace are also available in the formula editor in order to use their values in formulas.
Available functions and their syntax
A total of 13 different functions can currently be used in Formula Flavors. We support many of the common functions you may know from Excel or Google Sheets.
But this is just a taste - we are planning many more functions and possibilities.
|abs||Returns the absolute value of a number||
|asNumber||Returns the value of the parameter as a number rounded to 2 decimals, if possible||asNumber(number)||asNumber('3.14159265359') = 3.14|
|date||Returns the value of the parameter as date, if possible||date(date)||date("2021-05-03T15:00Z") = Mon May 03 2021 17:00:00 GMT+0200 (Mitteleuropäische Sommerzeit)|
Returns the number of days that lie between the two input dates
days(startdate, duedate) = 5
|flavor||Returns the value of the flavor||flavor(name)||flavor("unicorn") = 🦄|
|format||Serves for the formatting of a value within the list view. The value (or formula) to be formatted must be used as the first parameter. With the help of the 2nd parameter a prefix can be defined, with the 3rd parameter a suffix. The last parameter serves the coloring of the text content||format(expression, prefix, suffix, color)||format(cost, "Cost: ", " $", "red")|
|if||Used to define a condition||
if(condition, valueTrue, valueFalse)
|persist||Persists a field for calculation outside the task list. Must be written around the actual formula, and must be the first called function in a formula.||persist(...)|
Returns the value of the flavor from the project
projectFlavor("unicorn") = 🦄
Returns the year of a given date
|year("2021/06/21") = 2021|
|<=||Less or equal|
|>=||Greater or equal|