Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter Twenty-threeXBRL Functions (continued)

XBRLViewGetContextsByElement Function

Overview

The XBRLViewGetContextsByElement function returns all the contexts that contain facts for a specific element.

Syntax/Parameters

Syntax

string [] = XBRLViewGetContextsByElement ( handle hXBRL, string element );

Parameters

hXBRL

A handle containing the reference to an XBRL Object.

element

A string specifying the element for the facts. The element must contain the namespace designator. For example, “Assets” must be “us-gaap:Assets”.

Return Value

A string array containing each raw fact or an empty set on failure. Use the GetLastError function to retrieve a formatted error code or IsError / IsNotError to determine if an error occurred.

The ERROR_EOD (0x81000000) contains three variations to differentiate between errors:

1 — Element not found.

The ERROR_NONE_MASK can be ANDed to the value to determine which error occurred.

Remarks

An empty string entry indicates a “nil” fact.

The facts may be arbitrarily ordered. Use the XBRLViewGetContextsByElement function to match the context IDs.

Certain fact types such as text can be very large (up to 2MB).

Related Functions

Platform Support

GoFiler Complete, GoFiler Corporate, GoXBRL