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
getIndexGroupings The names of the entities that can be used to group the Elements in this array.
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.
getViolationCostEntity The name of the entity that contains the costs of relaxing this constraint.
getViolationUpperBoundEntity The name of the entity that contains the upper bounds of the violation of the relaxed constraints.
isAlwaysHidden Indicates whether the model entity is always hidden.
isConstant Indicates whether this entity's value is a constant.
isDisableable Indicates that this constraint entity can be disabled.
isHidden Indicates whether the model entity is hidden.
isIndexGrouping Indicates whether this entity is used as an Index Grouping.
isRelaxable Indicates that this constraint entity can be relaxed.

Methods

method
getAbbreviation ( ) → {string}

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

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

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

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

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

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

Entity formatting string

details
Returns:
returns table
Type Description
type
string
formatting string
Example
examples
entity.getFormat();
Back to Top
method
getIndexGroupings ( ) → {Array.<string>}

The names of the entities that can be used to group the Elements in this array.

e.g. An array indexed by Month can be grouped by Quarters.

details
Returns:
returns table
Type Description
type
Array.<string>
The names of the entities that can be used to group the Elements in this array
Example
examples
var array = entity.getIndexGroupings();
Back to Top
method
getIndexSets ( ) → {Array.<string>}

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

details
Returns:
returns table
Type Description
type
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
examples
var array = entity.getIndexSets();
Back to Top
method
getLabelsEntity ( ) → {string}

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

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

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

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

The name of this entity.

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

The data type of this entity.

details
Returns:
returns table
Type Description
type
insight.enums.DataType
The data type of this entity
Example
examples
entity.getType();
Back to Top
method
getViolationCostEntity ( ) → {string}

The name of the entity that contains the costs of relaxing this constraint.

details
Returns:
returns table
Type Description
type
string
the name of the violation cost entity
Example
examples
entity.getViolationCostEntity();
Back to Top
method
getViolationUpperBoundEntity ( ) → {string}

The name of the entity that contains the upper bounds of the violation of the relaxed constraints.

details
Returns:
returns table
Type Description
type
string
the name of the violation upper bounds entity
Example
examples
entity.getViolationUpperBoundEntity();
Back to Top
method
isAlwaysHidden ( ) → {boolean}

Indicates whether the model entity is always hidden.

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

Indicates whether this entity's value is a constant.

details
Returns:
returns table
Type Description
type
boolean
true if this entity's value is a constant, otherwise false
Example
examples
entity.isConstant();
Back to Top
method
isDisableable ( ) → {boolean}

Indicates that this constraint entity can be disabled.

details
Returns:
returns table
Type Description
type
boolean
true if this constraint can be disabled, otherwise false
Example
examples
entity.isDisableable();
Back to Top
method
isHidden ( ) → {boolean}

Indicates whether the model entity is hidden.

details
Returns:
returns table
Type Description
type
boolean
true if the model entity is hidden or always hidden, otherwise false
Example
examples
if (entity.isHidden()) {
     // do something if entity is hidden
}
Back to Top
method
isIndexGrouping ( ) → {boolean}

Indicates whether this entity is used as an Index Grouping.

details
Returns:
returns table
Type Description
type
boolean
true if this entity is used as an Index Grouping, otherwise false
Example
examples
if (entity.isIndexGrouping()) {
     // do something if entity is index grouping.
}
Back to Top
method
isRelaxable ( ) → {boolean}

Indicates that this constraint entity can be relaxed.

details
Returns:
returns table
Type Description
type
boolean
true if this constraint can be relaxed, otherwise false
Example
examples
if (entity.isRelaxable) {
     // do something if entity can be relaxed
}
Back to Top

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