AX2361

GetDocumentInfo function

Returns information about the current document.

GetDocumentInfo and GetFileSystemInfo serve similar purposes. GetDocumentInfo returns information about the current document, whereas GetFileSystemInfo returns information about any document.

Syntax

GetDocumentInfo("Code", "VariableName", "DefaultValue")

Parameter Description

Code

A code that specifies which piece of information about the document that you want the function to return. See the Code table below for the supported list of values.

VariableName

This parameter only applies if the DocInfo value is Variable.

The variable name for which you want to return a value. The variable name and value are passed to the current file by the GetDocument function.

DefaultValue

This parameter only applies if the DocInfo value is Variable.

Optional. The default value for the specified variable name. The function will return this default value until a new value is passed to the file using the GetDocument function.

All non-numeric entries must be placed in double quotation marks, unless you are using cell references to reference the text held in another cell.

The following values are supported for the Code parameter:

Code Description

ActiveSheetName

Returns the name of the sheet that was active when the last recalculation occurred.

CurrentSheetName

Returns the name of the current sheet (the sheet where the function resides).

Description

Returns the description of the current file, if defined.

DocumentID

Returns the ID of the current file (a numeric value assigned by Axiom Financial Institutions Suite).

DocumentName

Returns the file name of the current file.

DocumentType

Returns the document type for the current file (such as Report or Template).

EmbeddedFormType

Returns the embedded context for a form. For more information, see Controlling component visibility and enabled status.

FolderID

Returns the ID of the folder where the current file is located (a numeric value assigned by Axiom Financial Institutions Suite).

FolderName

Returns the name of the folder where the current file is located. Only the folder name is returned, not the full path.

FolderPath

Returns the folder path where the current file is located. The file name is not part of that path.

FullPath

Returns the folder path and file name of the current file. This is the same path that would display if looking up the file in Axiom Explorer.

IsReadOnly

Returns whether the file is opened read-only (as True/False).

LockedByUser

Returns the login name of the user who currently has the file lock.

RecordCreatedBy

Returns the login name of the user who created the file.

RecordCreatedDTM

Returns the date and time the file was created.

RecordModifiedBy

Returns the login name of the user who last modified the file.

RecordModifiedDTM

Returns the date and time the file was last modified.

Variable

Returns the value of a variable that was passed by the GetDocument function. For more information on using this option, see Passing values from one file to another using document variables.

Remarks

  • GetDocumentInfo only applies to managed files in the Axiom Financial Institutions Suite virtual file system. If used in a non-managed file, the function returns a blank value.

  • GetDocumentInfo is a volatile function.

Examples

=GetDocumentInfo("FolderName")

This example returns the name of the folder where the file is stored. For example: Budget Reports.

=GetDocumentInfo("DocumentName")

This example returns the file name of the file. For example: Income Statement.xlsx.

=GetDocumentInfo("DocumentID")

This example returns database ID of the file. For example: 219.

=GetDocumentInfo("FullPath")

This example returns the full path of the file. For example: \Axiom\File Groups\2021 Budget\Plan Files\11000.XLSX

=GetDocumentInfo("IsReadOnly")

This example returns True if the file is opened read-only. You might use this in an IF function in the header of a file to provide a message to the user, such as "ALERT: This file is read-only; changes cannot be saved."