Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter ElevenSGML Functions (continued)

XDXGetCalculationProperties Function

Overview

The XDXGetCalculationProperties function returns calculation properties extracted from a component or an engram.

Syntax/Parameters

Syntax

string = XDXGetCalculationProperties ( string data, [int position] );

Parameters

data

A string containing an engram or element component of an engram.

position

An optional int specify a calculation position from 1 to X within an engram. See Remarks below.

Return Value

A string array containing the context properties for an empty array on failure. Use the GetLastError function to retrieve a formatted error code and GetLastErrorMessage for additional detail.

If successful, the last error value will contain the number of calculation groups within an engram. For a component, the value will always be one.

Remarks

The key names are as follows:

  Definition   Description  
  relationship_code   A numeric version of the relationship. See below.  
  relationship_string   A string version of the relationship.  
  id   An identifier for the calculation that is 4 digits long. All engrams that use the same calculation identifier will be part of a single calculation. If an engram is used for a concept that is in more than one calculation another set of weight and identifier parameters are added.  

 

Relationship codes and strings

  Definition   Value   Keyword String   Description  
  Calculation Relationship              
    XDX_ROW_CALC_ADD   0   add   Adds  
    XDX_ROW_CALC_SUB   1   subtract   Subtracts  
    XDX_ROW_CALC_TOT   2   total   Totals  

 

Some presentation element may have more than one associated calculation. When using an engram as a data source, the position parameter can be used to specify which calculation group to reference.

The reciprocal function is XDXCreateCalculationComponent.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic