Initializing help system before first use

# Using Expressions

Expressions are statements used to insert dynamic content into a View or programmatically control layout and data flow.
They are specified as component attributes and are either added:

- to the `vdl-text` tag in the code editor.
- through the Text field in the View Designer.

Code editor

    <span vdl-text="=scenario.entities.TotalReturn.value"></span>

There was a simple expression in the earlier section VDL Basics - a Recap which can also be seen in the View Designer:
Figure : 1. Entering expressions using the View Designer
An expression is denoted by an equals sign `=` at the start of an attribute value. Everything after the equals sign is evaluated and re-evaluated when any referenced entities change.
Note: Attributes that can accept expressions are identified by the lightning symbol in the Attributes panel.

Not all elements accept expressions. The VDL Reference enumerates all of the available logic attributes, and attributes that can be added. For more, see VDL 5.8 Reference.

Covered Topics

- VDL Expression Language Syntax
  There are several basic rules to follow when using expression language.
- View Global Scope
  Several objects are implicitly within scope in views and available to expressions.
- Accessing Entities and Other Model Data
  When you reference a scalar entity or set/array element from the model, an object with two properties is returned.
- Using Dynamic Variables
  Dynamic variables allow you to define calculations or operations once and reference them in multiple expressions.
- Using Loops with Arrays and Sets
  VDL provides a couple of methods of repeating.
- Working with Conditional VDL Attributes
  You can implement conditional logic by combining expressions with a conditional VDL attribute. This is generally used to control whether content is included in the page or not, whether it is hidden, or how it is styled.
- Using VDL Include
  When an app written with VDL becomes large, it is common to require the same functionality in several independent views. There is also a case for creating custom extensions to handle certain features or layouts across multiple views. Both requirements are satisfied with the element.
- Advanced Expressions
  In addition to accessing the available global objects, you can make use of any standard JavaScript syntax and globals provided by the Xpress Insight API, such as insight and jquery.
- Validating User Input
  Even without any VDL modifications, as a user types into or selects a new value from a form field it is automatically validated.
- Adding Tooltips
  You can also add informatory tooltips to elements in a View through the code editor. Place them inside elements and they are shown when a user hovers over that element.

Parent Topic Using the View Designer and VDL to Create Custom Views

© 2001-2026 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.