Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

XBRLGetContext Function

Overview

The XBRLGetContext function returns a context as specified by file order position, by a context identifier or with a direct search for a specific zero or singe dimension context.

Syntax/Parameters

Syntax

string[] = XBRLGetContext ( handle hXM, int position | string identifier );

string[] = XBRLGetContext ( handle hXM, string date_a, string date_b,
                        string dimension, string value );

Parameters

hXM

A handle to an XBRL Object containing instance data.

   Direct Reference

position

A zero based int value specifying the context to retrieve. Or,

identifier

A string containing a context to locate by its unique identifier.

   Search

date_a

A string as the start date for a duration or the instant date.

date_b

A string as the end date for a duration. for instant, leave the parameter as an empty string.

dimension

A string specifying a dimension. For no dimension(s), leave the parameter as an empty string.

value

A string specifying a value for the dimension. For no dimension(s), leave the parameter as an empty string.

Return Value

Returns a string list of context properties or an empty array on failure. Use the GetLastError function to retrieve a formatted error code. 

Remarks

The list employs the key names specified at Section 11.20.10 Instance — Contexts.

After loading an instance, the context list is sorted by the identifier. Identifiers are case-sensitive.

The XBRLGetContext function operates in three modes: direct by index, direct by identifier and search by date and single dimension.

When searching by identifier, the search is performed as a fast binary search.

When searching by date and dimension, the context table is linearly scanned until a match is found. If a match cannot be made, ERROR_EOD is returned in the last error. Unlike XBRLGetContexts, wild cards are not allowed.

Related Functions

Platform Support

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

Legato IDE, Legato Basic