Initializing help system before first use

ModelSchema

Describes the schema of an Insight model.
Example
// to fetch a ModelSchema from a app
var entity = insight
     .getView()
     .getApp()
     .getModelSchema();

// to fetch a ModelSchema from a scenario instance
var entity = scenario
     .getModelSchema();

Method summary

name description
findArraysIndexedBy Finds the names of all array entities that are indexed by the given list of entity names.
getAllEntities All the entities in this schema.
getAppId The app id of this model schema.
getEntity Gets an entity by name.

Methods

findArraysIndexedBy ( entityNames ) → {Array.<object>}

Finds all array entities that are indexed by the given list of entity names.

The match is exact and the order of the index names is significant.

Parameters:
Name Type Description
entityNames Array.<string> the list of entity names expected in the index set
Returns:
Type Description
Array.<object> The array of entities that are indexed by the required index sets, empty if none are found
Example
var entityNameList = modelSchema.findArraysIndexedBy(['INDEX_SET1', 'INDEX_SET2']);
Back to Top
getAllEntities ( ) → {Object.<string, ModelEntity>}

All the entities in this schema.

Returns:
Type Description
Object.<string, ModelEntity> an array of all the entities in this schema
Example
var allEntities = modelSchema.getAllEntities();
Back to Top
getAppId ( ) → {string}

The app id of this model schema.

Returns:
Type Description
string The app id of this model schema
Example
modelSchema.getAppId();
Back to Top
getEntity ( entityName ) → {ModelEntity}

Gets an entity by name.

Parameters:
Name Type Description
entityName string the name of the entity
Returns:
Type Description
ModelEntity the entity or undefined if no entity exists with that name
Example
var entity = modelSchema.getEntity('ENTITY_NAME');
Back to Top

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