VDL Expression Language Syntax
Expressions are case sensitive, so Return and return refer to different objects.
scenario.entities.TotalReturn.value
gives access to the
entities property of the
scenario object. This in turn is also an object, and the second dot provides access to the
Return property of the
entities object.
Array Access
scenario.entities.MyArray(0).value
<span vdl-text="=scenario.entities.MyArray(0) ? scenario.entities.MyArray(0).value : ''"></span>
Function Calls
Functions of the VDL expression language can be written inline or within script blocks.
<vdl-validate pass="=function(entity,value) { return value > 100; }"> </vdl-validate>
![]() |
Note For more on the
<vdl-validate> element, see
Using Validators.
|
<script> function MyFunc (entity, value) { return value < 10; } </script> <vdl-validate pass="=MyFunc"></vdl-validate>This method provides more space in which to write what might be a more complex function, it can be read and understood more clearly and permits sharing with other elements if needed.
String Concatenation and Demarcation
You can use expressions to concatenate strings and returned entity values. Because an expression is enclosed in double quotes, use single quotes for strings within expressions:

String concatenation in the View Designer
<span vdl-text="='Calculated'+' '+'Optimal'+' '+'Return '"></span>The previous code snippet returns the value as 'Calculated Optimal Return'.
Key-value pairs
<div vdl-css="hilite: true, showing: false"></div>The symbol before a colon is called a key, anything after it (up until the end of the attribute string or the next comma) is the value. These are treated as evaluated expressions. If a chosen key contains anything other than alphanumeric characters (a-z, A-Z and 0-9) then the key itself must be placed inside quotes. To avoid clashing with the attribute quotes, use single quotes:
<div vdl-css="'hilite-item': true, 'showing-item':false"></div>Similarly, when the value is a string, for the same reason, enclose it in single quotes.
Arithmetic and Comparison (Boolean) Operators
Operator | Name | Example |
---|---|---|
+ | add | 2+2 = 4 |
- | unary negative | -10 |
- | subtract | 12 - 7 = 4 |
* | multiply | 8 * 7 = 56 |
/ | divide | 20/4 = 5 |
% | remainder | 20 % 7 = 6 |
< | less than | 3 < 6 |
<= | less than or equal to | 5 <= 10 |
> | greater than | 17 > 1 |
>= | greater than or equal to | 20 >= 20 |
== | roughly equal to | 3 == '3' |
!= | roughly not equal to | 4 != '4' |
=== | strictly equal | 6 === 6 |
!== | strictly not equal to | 6 !== '6' |
![]() |
Note If in doubt, use the strict comparisons. Use of the roughly equal/not equal operators can lead to unexpected matches.
|
Logical Operators
Operator | Name | Example |
---|---|---|
! | not | !false === true |
&& | logical and | True && !true === false |
|| | logical or | false || true === true |
© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.