Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FourteenProject Functions (continued)

ProjectInsertEntry Function

Overview

The ProjectInsertEntry function inserts a new entry into the project file entry list either by using an array with key names or as a series of parameters.

Syntax/Parameters

Syntax

int = ProjectInsertEntry ( int index, string[] array );

int = ProjectInsertEntry ( int index, string filename,
                      [string type, string description, string comment,
                       string status, string switches, string member] );

Parameters

index

An int that specifies the zero-based position before which the entry will be inserted within the project. If the value -1 is provided, the item is added to the end of the entries. Otherwise the value must be from 0 to the size of the list.

array

A string array specifying the data elements of the items. The case-sensitive key names are: Filename, Type, Description, Comment, EditStatus, Switches and Member. The Filename is a required field. See parameters below for size limits. If the size is exceeded the value is truncated without warning. If the array is employed, no further parameters are allowed.

filename

A string containing the filename and optional path. Filenames are normally relative to the project path. filename has a maximum of 512 characters. When filename is specified, the following parameters may also be specified.

type

An optional string containing a descriptive type. For EDGAR, this is the same as the ‘document type’. type has a maximum of 256 characters. This parameter can only be specified if filename is specified.

description

An optional string containing a description with a maximum of 512 characters. For EDGAR, this is the same as the ‘document description’. This parameter can only be specified if filename is specified.

comment

An optional string containing a comment with a maximum of 1024 characters. For EDGAR, this can be the same as the segment or module CIK. This parameter can only be specified if filename is specified.

status

An optional string containing a status string with a maximum of 256 characters. For EDGAR, this is the same as the segment CCC. This parameter can only be specified if filename is specified.

switches

An optional string containing switches with a maximum of 256 characters. This parameter can only be specified if filename is specified.

member

An optional string containing publishing member keywords with a maximum of 128 characters. This parameter can only be specified if filename is specified.

Return Value

Returns an int containing the zero-based index position of the inserted entry or -1 on failure. Use the GetLastError function to retrieve formatted error code. Use GetLastErrorMessage to retrieve narrative information on the error.

Remarks

Size limits are not indicative of any EDGAR limits, which are significantly smaller. See the EDGAR Filer Manual for details. Exceeding the above parameter sizes will result in a runtime error. The filename is required but is not validated on insert. All other fields are not validated. Project caret and select positions will not be adjusted by this function. However, the project window (Management View) is automatically updated to reflect the inserted entry.

For array entries, the key names are as follows:

  Key Name   Description  
  Filename   Entry filename. Generally relative but can be set as an absolute path.  
  Type   General string (EDGAR Document Type)  
  Description   General string (EDGAR Document Description)  
  Comment   General string  
  EditStatus   General string  
  Switches   General string  
  Member   Member set as string tokens: ‘Web’, ‘Book’, ‘Help’, ‘EDGAR’, ‘Support’, ‘UserA’ and ‘UserB’. For EDGAR products, ‘EDGAR’ is always assumed if blank.  

 

Related Functions

Platform Support

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