AX2359

GetDocument function

Opens a file in the Axiom Financial Institutions Suite file system—for example, a plan file or a report. Users can double-click on the cell that contains the function to open the file.

NOTES:  

  • The GetDocument function is intended to be used within Axiom files, to open other Axiom files or forms. If instead you want to create an externally usable hyperlink that can both launch the system and open the file, use the GetDocumentHyperlink function.

  • The GetDocument function cannot be used within Axiom forms. If you want to let users open other Axiom files or forms from within an Axiom form, you must use other means. See Hyperlinking to other files in an Axiom form.

Syntax

GetDocument("DisplayText", "DocumentPathorID", "SheetName", "CellAddress", CloseOnNavigate, OpenReadOnly, ForceReopen, ViewAsForm, "WebTabName", "Variables", UseCurrentPlanFileContext)

Parameter Description
DisplayText

The text to display in the cell.

The DisplayText displays as normal text in the cell. If you want the text to appear like a hyperlink on a web page, you must manually apply the font formatting to the cell.

DocumentPathorID

Optional. The file to open when the user clicks on the cell. Specify either the document ID, or the full path to the file.

The behavior for this parameter is as follows:

  • If omitted (blank), the current file is assumed. This could be used to jump from one sheet in a file to another sheet in the same file.
  • If a document ID is specified, or a complete folder path plus file name, that specific file is opened.
  • If a folder path is specified with no file name, then all files in that folder are opened. You must place a backward slash at the end of the folder path, such as: "\Axiom\Reports Library\North Reports\"
  • If a folder path is specified with a file filter (a file name that uses wildcard characters), then all files that match the filter are opened. For example: "\Axiom\Reports Library\Misc Reports\North*.xlsx" to return all files that start with North.

When multiple files are opened, the last file opened will be the active document, and the sheet and cursor position will be as they were when the file was last saved. The SheetName and CellAddress parameters are ignored in this circumstance.

SheetName

Optional. The name of the sheet to make active when the file is opened. If omitted, the file opens to the sheet that was active when the file was last saved.

This parameter only applies when the DocumentPath specifies a single file. Otherwise, it is ignored.

CellAddress

Optional. The cell location to make active when the file is opened. If omitted, the file opens to the cell that was active when the file was last saved.

This parameter only applies when the DocumentPath specifies a single file. Otherwise, it is ignored.

CloseOnNavigate

Optional. A Boolean value that determines how the current file is treated when the target file is opened.

  • If FALSE, then the current file remains open. False is the default value if this parameter is not specified.
  • If TRUE, then the current file is closed.
OpenReadOnly

Optional. A Boolean value that determines whether the target file is opened as read-only.

  • If FALSE, then the target file opens with the user's normal level of access rights as defined in Security. False is the default value if this parameter is not specified.
  • If TRUE, then the target file is opened as read-only, regardless of whether the user has a higher level of access to the file.

ForceReopen

Optional. A Boolean value that determines whether the target file is reopened if it is already open when a user double-clicks the GetDocument cell.

  • If FALSE, then the target file is not reopened if it is already open. False is the default value if this parameter is not specified.
  • If TRUE, then the target file is closed and then reopened if it is already open.

You might set this to True if the target file uses Axiom queries that are set to refresh on open, and you want the refresh to occur automatically whenever the user double-clicks on GetDocument.

ViewAsForm

Optional. A Boolean value that determines whether the target file is opened as an Axiom form.

  • If FALSE, then the target file is opened as the source spreadsheet for the Axiom form. False is the default value if this parameter is not specified.
  • If TRUE, then the target file is opened as an Axiom form.

By default, the Axiom form will open in the user's browser unless a WebTabName is also specified.

This parameter only applies to form-enabled files. It is ignored otherwise.

WebTabName

Optional. The name to display on the file tab within the Axiom Excel Client or Windows Client, when the target file is opened as an Axiom form.

If a tab name is defined, then the Axiom form will open as a web tab within the application. If this parameter is not specified, then the Axiom form will open in the user's browser.

This parameter can also optionally be used when opening non-form Axiom files, to specify an alternate tab name for the file.

Variables

Optional. One or more variable / value pairs to pass to the target file when it is opened. Variable / value pairs are specified as follows:

VariableName=Value;VariableName=Value

Separate multiple variable / value pairs using semicolons. If a variable value contains a semicolon, then it must be preceded by a backslash (\) so that Axiom does not treat the semicolon as a delimiter. Equals signs within a value (such as to pass a filter criteria statement as a value) do not need to be specially treated.

Variable values can be read in the target file by using the GetDocumentInfo function. For more information and examples, see Passing values from one file to another using document variables.

UseCurrentPlanFileContext

Optional. A Boolean value that determines whether the target template file is opened using the current plan file context.

  • If FALSE, then the current plan file context is not applied. False is the default value if this parameter is not specified.
  • If TRUE, then the current plan file context is applied to the target file.

Currently, this parameter is only used in product solutions with composite plan files. The parameter is ignored if it is used on an ineligible file type.

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. However, the Boolean values TRUE and FALSE do not need to be in quotation marks.

Remarks

  • The user's security settings are honored to determine if the user has the right to open a specified file. If the user cannot access any documents specified by the DocumentPathorID, then a message displays to the user to inform them that they do not have permission to access the file(s). If a folder path is specified (with or without a file filter), and the user has access to some documents in the folder, then only those documents are opened, and no message displays to the user about the other documents that could not be opened.

  • If you specify a folder as the DocumentPathorID (with or without a file filter), only files directly within the folder will be opened—subfolders are ignored.

  • Use caution when specifying a folder as the DocumentPathorID (with or without a file filter). If opening all files in the specified folder results in a large number of files, Axiom Financial Institutions Suite will attempt to open them all, which may take a long time (and could potentially cause your client to run out of memory). A folder path should only be specified if it will result in a small, targeted number of documents.

  • To obtain a file path for use in the function, you can right-click a file in Axiom Explorer or the Explorer task pane and choose Copy document path to clipboard, then paste the path into the function parameters (or into a cell that you will reference).

  • If your system is deployed in an environment where users work in different system languages, then you should use system folder names in any file paths. For more information, see Using system folder names.

  • The Axiom Double-Click setting does not need to be enabled for the sheet in order to use GetDocument.

  • GetDocument is a non-volatile function.

If your system is deployed in an environment where users work in different system languages, then you should use system folder names in any file paths. For more information, see Using system folder names.

Examples

=GetDocument("Open Income Statement","\Axiom\Reports Library\Misc Reports\Income Statement.xlsx","Report","E12")

This example opens the specified income statement report, with the Report sheet active and with the cursor at cell E12.

=GetDocument("Open Income Statement",93,"Report","E12")

This example is the same as the prior example, except the document ID is used instead of a folder path and file name.

=GetDocument("Open Plan",GetPlanFilePath("Budget 2022",3000),,,True)

This example opens the specified plan file, to whichever sheet and cell were active when the file was last saved. The file that contains the GetDocument function is closed when this file is opened. The separate function GetPlanFilePath is used to return the path of the plan file.

=GetDocument("Open North Region Reports","\Axiom\SystemFolderName_ReportsLibrary\Regional Reports\North*.xlsx",,,,True)

This example opens all reports in the Regional Reports folder where the file name starts with "North." This example uses the system folder name syntax, so the files in the specified folder can be opened regardless of what language the end user is running the system in. This example also uses the OpenReadOnly optional parameter to specify that the file is opened as read-only.

=GetDocument("Payroll Sheet",,"Payroll")

This example omits the document path, so that the current document is assumed. It jumps to the sheet Payroll within the current file.

=GetDocument("Open Dashboard",124,,,,,,TRUE,"Dashboard")

This example opens the target file as an Axiom form. Because a web tab name is defined, the form will open within the application instead of in the user's browser.