Initializing help system before first use

vdl-action-get-entity-data

Fetch data for one or many entities from single or multiple scenarios. Supported model entity types: ARRAY, SET, BOOLEAN, INTEGER, REAL & STRING. When using the "with-labels" attribute, data will be returned as a value/label ARRAY. Multi-scenario data can be returned as an arrays of data - one element per scenario, it can be merged into one array where the entity name and scenario id/name are added to the key. It can also be returned as part of an object that contains meta data for the scenario and the entity.

since 4.8

Required parent element

Must be contained within one of the following elements:

Example

<!-- using default scenario attribute -->
<vdl-action-group name="getData">
  <vdl-action-get-entity-data entity="myArrayEntity"></vdl-action-get-entity-data>
</vdl-action-group>
  <!-- for first scenario on shelf, will return: [
       { key: [1, 1], value: 100 },
       { key: [2, 1], value: 100 },
       { key: [3, 1], value: 100 }
   ] -->

<vdl-action-group name="getData">
  <vdl-action-get-entity-data entity="mySetEntity" scenario="0" with-labels="true"></vdl-action-get-entity-data>
</vdl-action-group>
  <!-- converts set data (that has a label array) to an array of objects, for [1, 2, 3]. will return: [
       {value: 1, label:"One"},
       {value: 2, label:"Two"},
       {value: 3, label:"Three"}
   ] -->

<!-- Filters: the index of the set, or the set name can be used in the filter -->
<vdl-action-group name="getFilteredData">
  <vdl-action-get-entity-data entity="myArrayEntity" scenario="0" filters="={'SetOneName':[1,2], 'SetTwoName':[1]}"></vdl-action-get-entity-data>
</vdl-action-group>
<vdl-action-group name="getFilteredData">
  <vdl-action-get-entity-data entity="myArrayEntity" scenario="0" filters="={0:[1,2], 1:[1]}"></vdl-action-get-entity-data>
</vdl-action-group>
  <!-- given an array keyed with SetOneName and SetOneTwo. will return: [
       { key: [1, 1], value: 100 },
       { key: [2, 1], value: 100 },
   ] -->

<!-- multi scenario using default output-format attribute (array) -->
<vdl-action-group name="getMultiScenarioData">
  <vdl-action-get-entity-data entity="myArrayEntity" scenarios="=scenarios"></vdl-action-get-entity-data>
</vdl-action-group>
  <!-- given there are two scenarios on the shelf, will return: [
       scenario-0 data,
       scenario-1 data
   ] -->

<vdl-action-group name="mergeScenarioDataById">
  <vdl-action-get-entity-data entity="myArrayEntity" scenarios="=[0,1]" output-format="merge-id"></vdl-action-get-entity-data>
</vdl-action-group>
  <!-- the id of each scenario is added to the key property. given there are two scenarios on the shelf, will return: [
       { key ["a", "b", "myArrayEntity", "scenario-0-id"] }...
       { key ["a", "b", "myArrayEntity", "scenario-1-id"] }...
   ] -->

<vdl-action-group name="mergeScenarioDataByName">
  <vdl-action-get-entity-data entity="myArrayEntity" scenarios="=[0,1]" output-format="merge-name"></vdl-action-get-entity-data>
</vdl-action-group>
  <!-- the name of each scenario is added to the key property, will return: [
       { key ["a", "b", "myArrayEntity", "scenario-0-name"] }...
       { key ["a", "b", "myArrayEntity", "scenario-1-name"] }...
   ] -->

<vdl-action-group name="getScenarioDataWithMeta">
  <vdl-action-get-entity-data entity="myArrayEntity" scenarios="=['scenario-1-id']" output-format="with-meta"></vdl-action-get-entity-data>
</vdl-action-group>
  <!-- will return: [
       { 
           key: ["myArrayEntity", scenario-1-id"], 
           meta: { 
                   scenario: scenarioObjRef, 
                   entity: entityObjRef, 
                }, 
           values: theScenarioData 
       } 
   ] -->

<vdl-action-group name="mergeMultiEntityDataByName">
  <vdl-action-get-entity-data entities="=['entityOne', 'entityTwo']" output-format="merge-name"></vdl-action-get-entity-data>
</vdl-action-group>
  <!-- the name of each scenario is added to the key property, will return: [
       { key ["a", "b", "entityOne", scenario-0-name"] }
       { key ["a", "b", "entityTwo", scenario-0-name"] }...
   ] -->

<vdl-action-group name="mergeMultiEntityDataFromMultipleScenarios">
  <vdl-action-get-entity-data entities="=['entityOne', 'entityTwo']" scenarios="=['scenario-1-id', 'scenario-2-id']" output-format="merge-id"></vdl-action-get-entity-data>
</vdl-action-group>
  <!-- the name of each scenario is added to the key property, will return: [
       { key ["a", "b", "entityOne", scenario-0-id"] }
       { key ["a", "b", "entityTwo", scenario-0-id"] }
       { key ["a", "b", "entityOne", scenario-1-id"] }
       { key ["a", "b", "entityTwo", scenario-1-id"] }...
   ] -->

Attributes

entities When fetching data from multiple entities, the names of the model entities to fetch data from. The entities must be supplied as a dynamic expression that resolves to an array of entity names. Cannot be used with entity attribute. since 5.2 requires expression
entity When fetching data from a single entity, the name of the model entity to fetch data from. If the entity attribute is not set then the current value passed by the previous VDL Action or VDL action group will be used to supply the entity name. An error will be displayed if the entity does not exist. Cannot be used with entity attribute. since 4.8 accepts expression
filters To return a only a slice of the array, pass a filters object that is keyed by either the set name, or the indices of the set to be filtered by. The values of the filters must in an array and relate to the keys not the labels. For example: {'SetOneName': [1,2], 'SetTwoName': [1,2]}, or {0: [1,2], 1: [1,2]}.An error will be thrown when un-related set names or indices that are not in range are used, or the values are not in an array. since 4.8 requires expression
output-format This defines how data is returned when fetching data from multiple scenarios and/or multiple entities. Supported formats: "array" (default): The requested data for each scenario will be pushed to an array, "merge-id": the entity name and scenario id are added to the key property, "merge-name": the entity and scenario names are added to the key property, "with-meta": an object is created for each scenario containing meta data about the scenario and entity. When merging data, if no key property exits, one is created. since 5.2 accepts expression
scenario When fetching data from a single scenario, the scenario to fetch data from. defaults to the first scenario. You can specify either a scenario id or the current position of the scenario on the shelf . since 4.8 accepts expression
scenarios When fetching data from multiple scenarios, the scenarios to fetch data from. You can specify an array of scenario ids, shelf positions or scenarios. since 5.2 requires expression
with-labels Add labels to the returned entity data. Labels will be fetched from the annotated labels array. If there is no label array, labels will contain the value. since 4.8

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