Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter ElevenSGML Functions (continued)

XBRLAddFact Function

Overview

The XBRLAddFact function adds a fact record to the XBRL Model fact table.

Syntax/Parameters

Syntax

int = XBRLAddFact ( handle hXM, string properties[], [dword flags] );

Parameters

hXM

A handle to an XBRL Object obtained using the XBRLCreateObject function.

properties

A string list containing information about the concept to be added.

Return Value

Returns an int as the index of the record position for the added item or a formatted error code on failure. The last error message will contain additional textual information regarding the failure. Use the GetLastErrorMessage and GetLastError functions to retrieve error information.

Remarks

Facts can be added to the instance tables one by one using this function. The caller must create a keyed string array using the following key names:

  Key Name   Description/Comment  
           
  Control Information:      
    id   An optional string ID to uniquely identify the fact/xbrl item. While optional, this value must unique. This field is required for certain XBRL operations and features such as footnote references.  
  Taxonomy Reference:      
    element   Element name as a full QName. The name should follow LC3 and XBRL Style Guide recommendations and be XML valid for an element name. If this parameter is provided, the prefix and concept keys should not be used.  
    prefix   Prefix to be associated with the namespace. When combined with the concept, this creates a QName for a qualified reference to the concept. this key should only be used with the concept key.  
    concept   Concept name. The name should follow LC3 and XBRL Style Guide recommendations and be XML valid for an element name. The concept must existing the XBRL Model concept table. This key should only be used with the prefix key name.  
  Aspects:      
    context_id   The context ID (contextRef) for the fact. The context must exist.  
    unit_id   An optional unit ID (unitRef) for the fact. This field must be supplied for numeric data types.  
    language   An optional ISO language code. This field should be supplied for textual data.  
  Attributes:      
    decimals   For numeric facts, this field specifies the decimals position as a number or “INF” for infinite.  
    precision   For numeric facts, this field specifies the precision position as a number or “INF” for infinite.  
    nil   Optionally specifies that the fact is nil. The value is tested as a “true” or “1”. An error or default is “false”. The data key should not be used with this key name.  
  Data:      
    data   An optional field specifying the data for the fact. The data will be encoded as necessary when exported.  
  Format Dependent:      
    format   An optional iXBRL transform name with the “ixt:” prefix. Setting this will cause the data provided to be placed in the raw data field and the transform run with the resulting data placed in the data field.  
    sign   An option sign as +/- for iXBRL field.  
  Flags:      
    hidden   If set to logic true (TRUE, 1, etc) the XM_FACT_HIDDEN flag is set. This is only relevant to iXBRL instances.  
  Position:   Positions can be set for control purposes. They are not used for exporting.  
    d_x d_y   Zero-based data X/Y position of the fact data. Using either of these key names will force the flag XM_FACT_CELL_POSITION changing the meaning of d_sx and d_sy.  
    d_sx d_sy d_ex d_ey   Zero-based file X/Y position of the fact data.  

 

At the completion of adding facts, the model must be post processed using the XBRLPostProcess function to sort/resort the data for reference by other functions. The post process can be performed after all data has been added to the model.

The data value is not validated until post processing. Invalid data is not removed or corrected.

Related Functions

Platform Support

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

Legato IDE, Legato Basic

Page revised 2024-12-13