GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Fourteen — Project Functions (continued)
ProjectGetEntryAsString Function
Overview
The ProjectGetEntryAsString function will retrieve a specific data element from a project entry as a string.
Syntax/Parameters
Syntax
string = ProjectGetEntryAsString ( int index, int item );
Parameters
index
An int that specifies the zero-based position of the entry within the project.
item
An int specifying the item to retrieve.
Return Value
Returns a string containing the specified item or an empty string on failure. Use the GetLastError function to retrieve error information.
Remarks
Entry properties are mixed as strings and numeric data. The GetLastError function should be used to differentiate between an empty return string caused by an empty item or by an error.
The items are as follows:
Term | Ordinal | Description | ||||
File: | ||||||
PROJECT_ENTRY_NAME | 0 | Source Name (relative to project base) | ||||
PROJECT_ENTRY_MOD_TIME | 1 | Time the file was last modified (returned as ISO-8601) | ||||
PROJECT_ENTRY_SIZE | 2 | Size of the file | ||||
PROJECT_ENTRY_F_TYPE | 3 | File Type (FT_) | ||||
PROJECT_ENTRY_FLAGS | 4 | Flags | ||||
PROJECT_ENTRY_STATUS_DESCRIPTION | 5 | File Status (open status, not saved) | ||||
Application Properties: | ||||||
PROJECT_ENTRY_D_TYPE | 6 | Descriptive Type (EDGAR Document Type) | ||||
PROJECT_ENTRY_DESCRIPTION | 7 | File Description (EDGAR Description) | ||||
PROJECT_ENTRY_COMMENT | 8 | Comment | ||||
PROJECT_ENTRY_EDIT_STATUS | 9 | Edit Status | ||||
Publishing: | ||||||
PROJECT_ENTRY_MEMBER_FLAGS | 10 | Membership Flags | ||||
PROJECT_ENTRY_SWITCHES | 11 | Publishing Switches | ||||
FTP Server/Transfer Information: | ||||||
PROJECT_ENTRY_LU_SIZE | 12 | Last Upload Size | ||||
PROJECT_ENTRY_LU_MOD_TIME | 13 | Last Upload Modified Time (returned as ISO-8601) | ||||
PROJECT_ENTRY_LU_SERVER_TIME | 14 | File Time on File Server (returned as ISO-8601) |
The following example is a subroutine that will load all document filenames, types, and descriptions into a table:
// ** Global Items string list[200][3]; // Document List (200 max EDGAR) int get_document_list() { // Load the document list string name; int ix, size; ArrayClear(list); // For Repeat Calls size = ProjectGetEntryCount(); while (ix < size) { name = ProjectGetEntry(ix); list[name][0] = name; list[name][1] = ProjectGetEntryAsString(ix, PROJECT_ENTRY_D_TYPE); list[name][2] = ProjectGetEntryAsString(ix, PROJECT_ENTRY_DESCRIPTION); ix++; } return ERROR_NONE; }
Notice the name of the document is also used as a key name allowing for reference by the filename. In addition, the list is cleared on call to remove any problems with repeated calls.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.