Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter ElevenSGML Functions (continued)

XBRLGetFact Function

Overview

The XBRLGetFact function returns a fact as specified by file order position or as filtered by element, context ID or Unit ID.

Syntax/Parameters

Syntax

string[] = XBRLGetFact ( handle hXM, int position);

string[] = XBRLGetFact ( handle hXM, string element, [string context],
                                [string unit], [int from]);

Parameters

hXM

A handle to an XBRL Object containing instance data.

position

A zero-based int specifying the fact position within the fact table. Or, the following three or four parameters,

element

A string specifying an element or concept, with or without wildcard characters. If the value has a ‘:’ character, indicating a QName, the element name is matched, otherwise the concept name is matched. This parameter can be an empty string.

context

A string specifying an context ID, with or without wildcard characters.

unit

A string specifying a unit ID, with or without wildcard characters.

from

An optional zero-based int specifying the starting fact to search from. If omitted, the value will be zero, the start of the fact list.

Return Value

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

Remarks

When a fact has is returned, it is a list of element that employs the key names specified at Section 11.20.9 Instance — Facts.

Facts can be referenced directly by a zero based position or searched for using the one or more of the element, context id or unit id parameters. When searching, at least one of the three parameter strings must contain data.

The from parameter only applies to searching.

Each search item can use ‘*’ and ‘?’ wildcard characters. If wildcard character are not used, the string are matched as exact. Strings are case-sensitive.

Note that the fact list is not sorted and the search is performed on a linear basis.

This function differs from XBRLGetFacts in that the list is scanned until a case-sensitive match is made. XBRLGetFacts allows for a large combination of filters and returns all matching facts.

Related Functions

Platform Support

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

Legato IDE, Legato Basic