Initializing help system before first use

Global

Method summary

name description
addAction Register a custom VDL action. This global function is only available within VDL views, you will get an error if you try to call it within a custom HTML view.
VDL Register a custom VDL extension. This global function is only available within VDL views, you will get an error if you try to call it within a custom HTML view.

Members

insight - { Insight }
Root level variable that provides access to the Xpress Insight JavaScript API.
Properties:
Name Type Description
Formatter Formatter The entity formatter
Example
// Has a ready method that you should pass you view code into
insight.ready(function() {
    // You will usually need a reference to the view object, fetch this as follows
    var view = insight.getView();

    // You view code goes here
});

Methods

addAction ( actionName, actionConfig )

Register a custom VDL action. This global function is only available within VDL views, you will get an error if you try to call it within a custom HTML view.

Parameters:
Name Type Description
actionName string Identifying name of the VDL action. This is used as the tag selector in the VDL view.
actionConfig VdlAction VDL Action implementation
Back to Top
VDL ( name, extension )

Register a custom VDL extension. This global function is only available within VDL views, you will get an error if you try to call it within a custom HTML view.

Parameters:
Name Type Description
name string Identifying name of the extension. This is used as the tag selector if a tag or attribute property is not specified in the extension object.
extension VdlExtension Extension definition
Example
VDL('my-title', {
  template: '<h4><vdl-content></vdl-content></h4>'
});

VDL('my-view-link', {
  transform: function (element, attributes, api) {
    var action = 'alert("no view specified")';
    if (attributes.view) {
      action = 'function () { insight.openView("' + attributes.view.rawValue + '") } ';
    }
    api.addBinding(element, 'click', action);
  }
});
Back to Top

Type Definitions

ActiveTableMarker - { object }
Identifies a cell marker.
Properties:
Name Type Description
rowKey string A unique row identifier for the cell.
columnVisibleIndex number Visible column index of the cell.
AttributeAvailableWhenRule - { Object }
Attribute availability rule.
Properties:
Name Type Argument Description
attribute string optional  Name of the attribute to to test against
rule string optional  Name of the rule to apply (equals, isEmpty, ...)
value string | number | boolean optional  Value to test for
AttributeValidation - { Object }
Attribute validation rules.
Properties:
Name Type Argument Description
range Array.<number> optional  Number within a range [0] min, [1] max
allowedValues Array.<string> optional  List of allowed values
EntityValidatorCallback ( entityName, value, indices ) → {Result}
Parameters:
Name Type Description
entityName string The name of the entity to validate
value * The new value to validate
indices Array.<*> Element index, if an array entity
Returns:
Type Description
Result The validation result and a message, in in error
Back to Top
ExpressionVarDoc - { Object }
Expression variable documentation.
Properties:
Name Type Description
name string Name of the variable
type string Data type of the variable
description string Description of the variable
ExtensionAttribute - { Object }
VDL Extension attribute definition.
Properties:
Name Type Argument Default Description
name string The name of the attribute
description string optional  The description of the attribute
acceptsExpression boolean optional  false Attribute accepts an expression
expression 'all' | 'static' | 'dynamic' optional  'static' Whether attribute accepts/requires expression or just a static value
required boolean optional  false Whether the attribute is required
defaultValue string optional  Specify a default value for the attribute
valueType string | Array.<string> optional  'string' The data type(s) of the attribute value
docIgnore boolean optional  false Whether to include the attribute in VDLDoc
availableWhen Array.<AttributeAvailableWhenRule> optional  List of rules to determine if the attribute is available
mutexGroup string optional  Name of a group in which only one member attribute can be specified
expressionVars Array.<ExpressionVarDoc> Documentation on available expression variables
validation AttributeValidation optional  Validation rules
ExtensionAttributeMutex - { Array.<string> }
VDL Extension attribute mutex. List of attribute names where only one can be specified per element.
ExtensionDoc - { Object }
VDL Extension documentation.
Properties:
Name Type Argument Default Description
ignore boolean optional  false Should the extension be ignored when generating the documentation
group string optional  The group the vdl extension belongs to
description string optional  Description of the VDL extension
descriptionAsHtml boolean optional  false Should the description be treated as HTML, defaults to false
elementContents Object optional  Documents the element contents
Properties
Name Type Argument Default Description
description string optional  Describes what contents are allowed inside the element
acceptsMarkup boolean optional  false Whether markup is allowed within the element contents
example string optional  Pre-formatted markup example of the extension
Folder - { Object }
Properties:
Name Type Description
displayName string The name of the folder
id string The ID representing the folder
objectType string The type of this object
ownerId string the owner username of the folder
parent string The parent object reference of this folder
path string The path to this folder
shareStatus string the share status of this folder
url string the url to this folder resource
NewAttachmentOptions - { Object }
Optional information to create a new attachment.
Properties:
Name Type Argument Description
options.filename string optional  The new attachment filename
options.fileExtension string optional  The new attachment extension. If filename is also present the extension will be appended to it (separated by a dot), otherwise the extension will be appended to the default filename.
options.editorId string optional  Editor to create the attachment with
options.tag string optional  Tag to add to the new attachment
NotifyCallback ( scenario, viewProperties )

Called when scenario observer data changes. The callback gets passed either a single Scenario, if observing withFirstScenario, or an array of Scenario objects, in all other cases. The Scenario objects are special in that the only allow access to entities that are being declared by the ScenarioObserver. The second argument is an object that allows access to the view properties declared by the ScenarioObserver.

Parameters:
Name Type Description
scenario Scenario | Array.<Scenario> A single scenario or ordered list of scenarios depending on what is declared by the scenario observer
viewProperties MaskedViewProperties An accessor object to access the view properties declared by the scenario observer
Back to Top
PrimitiveType - { number | boolean | string }
A primitive type. Number, Boolean or String
TableCellIndex - { object }
A cell index. This is not the display position in the table but its internal index that can be used to lookup the cell object from the DataTable API.
Properties:
Name Type Description
row number
column number
columnVisible number
VdlAction - { Object }
VDL Action interface.
Properties:
Name Type Argument Description
name string optional  Identifying name of the VDL action
displayName string optional  Display name of the VDL action
isAction boolean optional  is a VDL Action
attributes Array.<ExtensionAttribute> optional  List of attributes for the VDL action
attributeMutex Array.<ExtensionAttributeMutex> optional  List of mutually exclusive attributes
doc ExtensionDoc optional  Documents the VDL action
run function optional  main VDL Action callback
VdlAttribute - { Object }
A parsed VDL attribute.
Properties:
Name Type Argument Description
entities VdlEntities optional  entities discovered, indexed by name, a list of scenarios indices
rawValue string The original, unprocessed attribute text
expression Object
Properties
Name Type Description
value string The processed expression derived from the attribute text
isString boolean Whether the expression is a plain string value, i.e. wrapped in double-quotes
VdlErrorTargetSelector ( element ) → {Element|jQuery}

Given an element that has a transform error, select an alternative target element to apply the error message too.

Parameters:
Name Type Description
element Element The element in error
Returns:
Type Description
Element | jQuery The element to transfer the error to
Back to Top
VdlExtension - { Object }
VDL Extension interface.
Properties:
Name Type Argument Default Description
name string optional  Identifying name of the extension
tag string optional  Tag name matched when discovering instances
isContainer boolean optional  can contain other elements
isAction boolean optional  is a VDL Action
attributes string | Array.<string> | ExtensionAttribute | Array.<ExtensionAttribute> optional  One or more attribute names to match when discovering instances
attributeMutex Array.<ExtensionAttributeMutex> optional  List of mutually exclusive attributes
modifiesDescendants boolean optional  true Whether the extension modifies, and controls descendant nodes. When true it is not possible to reference other extensions in the descendant nodes that have this flag set to true.
requiredParent string | Array.<string> optional  Name of the required parent tag, if an array then it should be one of the items from that array
transform VdlExtensionTransform How to transform matched elements
template string optional  Knockout component HTML template
errorTargetSelector VdlErrorTargetSelector optional  Callback to select an alternative element to apply any transform errors too
doc ExtensionDoc optional  Documents the VDL extension
createViewModel ViewModelFactory optional  Knockout view model factory function
VdlExtensionTransform ( element, attributes, api )

Transform matched DOM elements before Knockout is applied to the DOM.

Parameters:
Name Type Description
element Element Matched element
attributes Object.<string, VdlAttribute> Map of the parsed attributes on the element
api ExtensionApi The extension API for modifying the global view model and manipulating the DOM
Back to Top
VdlValidator - { Object }
VDL Validator interface.
Properties:
Name Type Argument Description
name string optional  Identifying name of the extension
validate function optional  The function that will carry out the validation
Version - { Object }
Properties:
Name Type Description
major number The major version
minor number The minor version
patch number The patch version
ViewModelFactory ( params, componentInfo ) → {Object}

Factory function to create a view model.

Parameters:
Name Type Description
params Object.<string, *> Map or parameters passed from the custom element
componentInfo Object
Properties
Name Type Description
element Element The element the component is being injected into. When createViewModel is called, the template has already been injected into this element, but isn't yet bound.
templateNodes Array.<Element> An array containing any DOM nodes that have been supplied to the component
Returns:
Type Description
Object The generated view model
Back to Top

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