/
Structure Elements for Calculated Fields
Structure Elements for Calculated Fields
To implement complex algorithms (e.g. Security - Incident - CVSS 3.1 (CVSS Calculation explained )) you can use the following structural elements.
if condition
Allows you to compare expression1 with expression2 using a condition.
an expression is a single-line expression which can contain these operators. Operators for Calculated Fields
you can use the following conditions
>
>=
==
<=
<
!=
the if sections cannot be nested
the Else section is optional
Structure
#if (expression1) condition (expression2) {
// one or more lines
} else {
// one or more lines
}
Example
#if (scope) == (1) {
#variableImpact(6.42 $variableISS *)
} else {
#variableImpact(7.52 $variableISS 0.029 - * 3.25 $variableISS 0.02 - 15 ^ * -)
}
return declaration
Returns the result of the expression . the following elements are ignored
Structure
#return(expression)
Example
variable definition
Defines a variable which you can access in the following lines
Structure
Example
variable usage
Returns the value of a variable and can be used within expressions
Structure
Example
or combined with variable definition
, multiple selections available,
Related content
What exactly is a Calculated Field?
What exactly is a Calculated Field?
More like this
Operators for Calculated Fields
Operators for Calculated Fields
More like this
What exactly is the Calculation Algorithm?
What exactly is the Calculation Algorithm?
More like this
How to configure Calculated Fields
How to configure Calculated Fields
More like this
CVSS Calculation explained
CVSS Calculation explained
More like this
Board Score - Item View explained
Board Score - Item View explained
More like this