Initializing help system before first use

vdl-repeat

Create a copy of the element containing the vdl-repeat attribute for each item in a Set, scenario on the shelf, or each element in a plain JavaScript array.

Example

<p>Show the support level for each scenario</p>
<ul vdl-repeat="=s in scenarios">
  <li vdl-repeat="=supportLevel in s.entities.SupportLevel" vdl-text="=supportLevel.label"></li>
</ul>

<p>Show a list item for each element of a place JavaScript array. Also show the loop index</p>
<script>
  function getItems() {
    return ['one', 'two', 'three'];
  }
</script>
<ul>
  <li vdl-repeat="=item,index in getItems()" vdl-text="=index + ': ' + item"></li>
</ul>

Attributes

vdl-repeat An expression in the form: "=x,y in expression", where "x" is the value of the current item, "y" is the current loop count and "expression" is a standard JavaScript expression that returns a Set, list of scenario or plain array. The loop variables, "x" and "y", can be referenced anywhere else on or within the element containing the vdl-repeat attribute. requires expression required

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