Initializing help system before first use

ModelEntity

Describes an Insight Model Entity
Example
// to fetch a ModelEntity from an app
var entity = insight
     .getView()
     .getApp()
     .getModelSchema()
     .getEntity('ENTITY_NAME');

// to fetch an ModelEntity from a scenario instance
var entity = scenario
     .getModelSchema()
     .getEntity('ENTITY_NAME');

Method summary

name description
getAbbreviation The abbreviation for this entity.
getAlias The alias for this entity.
getElementType The data type of the elements held in this Array or Set.
getFormat Entity formatting string
getIndexSets The names of the entities used to index the elements in this array.
getLabelsEntity The name of the entity that holds the labels for this entity.
getManagementType Indicates whether this data is part of the input data or results.
getName The name of this entity.
getType The data type of this entity.
isAlwaysHidden Indicates whether the model entity is always hidden.
isConstant Indicates whether this entity's value is a constant.
isHidden Indicates whether the model entity is hidden.

Methods

getAbbreviation ( ) → {string}

The abbreviation for this entity. Will fallback to alias and then name if the entity has no abbreviation or alias respectively.

Returns:
Type Description
string The abbreviation for this entity. Fallback to alias and name.
Example
entity.getAbbreviation();
Back to Top
getAlias ( ) → {string}

The alias for this entity. Will fallback to name if the entity has no alias.

Returns:
Type Description
string The alias for this entity. Fallback to entity name.
Example
entity.getAlias();
Back to Top
getElementType ( ) → {insight.enums.DataType}

The data type of the elements held in this Array or Set.

Returns:
Type Description
insight.enums.DataType the data type of the elements, or nullif the entity is not an Array or a Set
Example
entity.getElementType();
Back to Top
getFormat ( ) → {string}

Entity formatting string

Returns:
Type Description
string formatting string
Example
entity.getFormat();
Back to Top
getIndexSets ( ) → {Array.<string>}

The names of the entities used to index the elements in this array.

Returns:
Type Description
Array.<string> The names of the entities used to index the elements in this array, or null if the entity is not an array.
Example
var array = entity.getIndexSets();
Back to Top
getLabelsEntity ( ) → {string}

The name of the entity that holds the labels for this entity.

Returns:
Type Description
string The name of the entity that holds the labels for this entity
Example
entity.getLabelsEntity();
Back to Top
getManagementType ( ) → {insight.enums.EntityManagementType}

Indicates whether this data is part of the input data or results.

Returns:
Type Description
insight.enums.EntityManagementType Indicates whether this data is part of the input data or results
Example
entity.getManagementType();
Back to Top
getName ( ) → {string}

The name of this entity.

Returns:
Type Description
string The name of this entity
Example
entity.getName();
Back to Top
getType ( ) → {insight.enums.DataType}

The data type of this entity.

Returns:
Type Description
insight.enums.DataType The data type of this entity
Example
entity.getType();
Back to Top
isAlwaysHidden ( ) → {boolean}

Indicates whether the model entity is always hidden.

Returns:
Type Description
boolean true if the model entity is always hidden, otherwise false
Example
entity.isAlwaysHidden();
Back to Top
isConstant ( ) → {boolean}

Indicates whether this entity's value is a constant.

Returns:
Type Description
boolean true if this entity's value is a constant, otherwise false
Example
entity.isConstant();
Back to Top
isHidden ( ) → {boolean}

Indicates whether the model entity is hidden.

Returns:
Type Description
boolean true if the model entity is hidden or always hidden, otherwise false
Example
if (entity.isHidden()) {
     // do something if entity is hidden
}
Back to Top

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