Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter ElevenSGML Functions (continued)

XBRLGetCalculationItem Function

Overview

The XBRLGetCalculationItem is a high level function which will retrieve a resolved calculation information for a specified record or total concept.

Syntax/Parameters

Syntax

string[] = XBRLGetCalculationItem ( handle hXM, int index, [int key] );

Parameters

hXM

A handle to an XBRL Object containing taxonomy information.

index

An int value as a zero based index to the calculation items table. Or,

key

An optional int specifying the key to use. The default is XBRL_GET_CAL_DEFAULT_KEY, (0), or the default sort of the calculation item list.

Return Value

Returns a string arr of a calculation item or an empty array on failure. Use the GetLastError function to retrieve a formatted error code.

Remarks

Calculation items are resolve records created during the XBRL post process and run via the XBRLPostProcess function. The calculation list is sorted by:

Title (as set by calculation link)

Role (as set by calculation link)

Group Concept (totals to)

Order

Item Concept (member item)

Three additional keys (indexed lists) are available sorted bye the following

Item Concept — Sorted by item concept name, duplicate item order is not specified

Group Concept — Sorted by group concept, order and item concept

Role — Sorted by role, group concept, order and item concept

SDK key definitions:

#define XBRL_GET_CAL_DEFAULT_KEY               0       /* No Key/Default            */
#define XBRL_GET_CAL_ITEM_CONCEPT_INDEX_KEY    1       /* Sort by Item Concept      */
#define XBRL_GET_CAL_GROUP_CONCEPT_INDEX_KEY   2       /* Sort by Group Concepts    */
#define XBRL_GET_CAL_ROLE_INDEX_KEY            3       /* Sort by Role              */

The key names are as follows: 

  Key Name   Description/Comment  
           
  Item record      
    title   Optional title of calculation role, repeated for each item in the group.  
    role   Role URI of calculation, repeated for each item in the group.  
    order   A floating point value as a string specifying the order of the item within the group.  
  Calculation Member      
    group_prefix   QName prefix for group element. †  
    group_concept   QName concept name for group element. †  
    group_concept_pos   Concept index for group concept. †  
    item_prefix   QName prefix for item element. †  
    item_concept   QName concept name for item element. †  
    Item_concept_pos   Concept index for item concept. †  
    weight   The sign or weight of the item, “1” for ‘+’ and “-1” for ‘-’. †  
  Cross Linking      
    link_x   Index to calculation link.  
    arc_x   Index to calculation arc. †  
    loc_from_x   Index to locator ‘from’ record. †
    loc_to_x   Index to locator ‘to’ record. †  
  Control      
    position   The zero based position within the calculation arc table.  
    s_dx   Source file DTS index. String is “-1” if not from the DTS.  
    s_lx   Source file linkbase index. String is “-1” if not from the Linkbase List.  
    l_sx   X position in source linkbase file for the calculation link. †  
    l_sy   Y position in source linkbase file for the calculation link. †
    a_sx   X position in source linkbase file for item arc. †  
    a_sy   Y position in source linkbase file for item arc. †  
    cal_flags   A string as a hexadecimal value for the status of the entry.  

 

†  These items will be empty or -1 if the record specifies a link without calculation content.

Related Functions

Platform Support

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

Legato IDE, Legato Basic