Extended Objects

Extended can be written in a variety of objects and locations. The primary ones are all prefaced with “Extended” in their name. Each of these objects has different functionality, and may only support certain types of values. For example, Extended Tables only work with Extended expressions that return a Table or a List. There are also secondary locations in the system where Extended can be written. Here Extended code is not required, but is included as an optional way to enhance the functionality of the object.

Primary Locations

These are locations/objects in the system that require Extended code to fulfill their functionality.

Extended Function

Extended Function is an Extended expression that is only evaluated where it is located in the Model, and cannot be called from anywhere else. The relationship between an Extended Function and Extended Expression mirrors the one between a Function and a Function expression. This means that an Extended Function can call an Extended Expression, but not the other way around.

Extended Expression

Extended Expression objects contain reusable Extended code that can be called from more than one place. It is located in the Expression area of Configuration Studio, and is similar in use to Function Expression and Query Expression. Just like Function and Query Expressions, once an Extended Expression is written, it can be called from other locations in the system, and is then calculated based on the context of where it was called from. This makes Extended Expressions great for Extended code that will be used regularly.

When an Extended Expression is called, the expression will be evaluated and the result will be returned to where the expression was called from. If the expression utilizes context, it will use the context of where it was called from. For example, if an expression was called from a Function under a KPI, this.object would refer to the KPI, and this.organisation would refer to the owning Organisation of the KPI. It is also possible to specify the context using the calculate() function.

Extended Expressions can be called by either :

  • using the expression property of the Extended Expression: t.<expressionID>.expression

  • wrapping the ID of the expression in curly braces {}: {<expressionID>}

// The following is an expression with id "myExpression"
"ID: " + this.object.id + " -- Name: " + this.object.name


// The following is an example of calling the expression from a Function under a Scorecard
// The function:   t.myExpression.expression
ID: CORPORATER_SC -- Name: Corporater Scorecard

// The following is an example of calling the expression using the calculate function.
t.KP009.calculate(t.myExpresion.expression)             // ID: KP009 -- Name: Sales Billed

Extended Table

Extended Table is an object that will generate a table based on the Extended code. The code must evaluate to either a table or a List. It is possible to call an Extended Expression from an Extended Table as long as the expression evaluates to a Table or a List.

Extended Property

Extended Property is an property that can be added to an object just like any other property. The property contains an Extended expression that returns a value. In the configuration of the property, the User must also specify the return datatype that is expected.

_images/extendedProperty.png

Extended Action

Tip

Extended Action supports transactional Extended.

Extended Action is an “Action” located in the Workflow area of Configuration Studio. When the parent Event rule is run, the Extended Action will be executed, just like any other Workflow action.

Extended Actions derive their context from the objects returned by the Event rule. This means that this.object can be used to perform the action on every object returned by the Event rule. That being said, it is still possible to harcode or query for objects that should be used in the action.

Extended Target

Tip

Extended Target supports transactional Extended.

Extended Target is an object located in Transformer area of Configuration Studio. Just like other Transformer Targets, it serves as the endpoint for a Transformer job. Extended Target allows you to write Extended code that utilizes cell data from the Transformer job.

Secondary Locations

These are locations in the system where Extended can be written, but is not required. Typically these take the form of an “Expression” property of an object that can be toggled on by checking an “Advanced Mode” checkbox. The object itself does not require any Extended code and can fully function without it.

_images/chartAdvancedMode.png

There are many objects that can be considered as secondary locations for writing Extended code, such as:

Charts

Most Charts have an Extened expression that resolves to a table, which can be used instead of the Table reference property.

Dataset Tables

Extended expression can be used to query a list of objects for an axis.

Action Button

When using the “Add” functionality of the Action Button, an Extended expression must be used to determine the destination object that the new object will be added to.