AX2355

GetFormDocumentLinkTag function

Generates a hyperlink tag to an Axiom form in the Axiom file system, using the special content tags for use in Formatted Grid components. When the source file containing the content tag is viewed as an Axiom form, the tag will render as a hyperlink to the specified file.

This function is only for use within form-enabled files. The content tags generated by the function have no effect within the source file; the file must be viewed as a form in order to use the hyperlink.

Syntax

GetFormDocumentLinkTag("DisplayText", DocIDorPath, "SheetFilter", OpenInNewWindow, GeneratePDF, "Variables")

Parameter Description
DisplayText

The display text for the hyperlink.

DocIDorPath

The file for which you want to create a hyperlink. You can specify this file by entering either of the following:

  • The document ID of the file, such as 93.
  • The full path to the file, such as \Axiom\Reports Library\Forms\Dashboard.xlsx.

SheetFilter

Optional. A filter to be applied as a temporary sheet filter to the target file.

This parameter specifies both the type of filter (table type, table, etc.) and the filter criteria statement. See the following section for more information on the sheet filter syntax.

When the target file is opened via hyperlink, the specified filter is applied as a sheet filter behind the scenes. The filter does not display on the Control Sheet, and will not be saved in the file (similar to Quick Filter functionality).

OpenInNewWindow

Optional. A Boolean value that specifies whether the Axiom form is opened in a new window or the current window:

  • FALSE (Default): The document will be opened in the current window (or tab), replacing the current contents.
  • TRUE: The document will be opened in a new window (or tab).

GeneratePDF

Optional. A Boolean value that specifies whether the hyperlink will generate a PDF copy of the form:

  • FALSE (Default): The form will be opened normally.
  • TRUE: A PDF will be generated for the form and this PDF will be opened instead of the form.

This parameter is intended to be used to enable PDF printing of an Axiom form. For more information, see Configuring an Axiom form for printing to PDF.

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.

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.

Sheet filter syntax

The sheet filter parameter uses the following syntax:

FilterTarget;CriteriaStatement

The FilterTarget is a table name or a table type name. It specifies the tables to be affected by the sheet filter.

  • Reference table: If the filter target is a reference table (such as DEPT), then the filter is applied to all tables that link to the DEPT table.
  • Table type: If the filter target is a table type (such as GL), then the filter is applied to all tables in the table type.
  • Data table: If the filter target is a data table (such as GL2019), and the table belongs to a table type, then the filter is applied to all tables in the table type. Otherwise, the filter is applied to the specified table.

NOTE: Axiom Software checks for matches in the order listed above. Therefore if a reference table and a table type share the same name, the target will be the reference table.

The CriteriaStatement is the filter criteria statement to apply to the affected tables. Standard filter criteria syntax applied. For example:

DEPT;Dept.Region='North'

This filter applies to all tables that link to the DEPT table, and filters the data for the North region.

NOTES:  

  • When using the sheet filter parameter, keep in mind that the temporary filter will be concatenated with any existing sheet filters in the file using AND. If the document has existing sheet filters, you should test the GetDocumentHyperlink filter to ensure that the combination of filters returns data as you intended.
  • The function GetCurrentValue can be used in the target file to return information about the temporary sheet filter.

Remarks

  • Both GetFormDocumentLinkTag and GetFormDocumentURL can be used to generate a hyperlink to an Axiom form within a Formatted Grid component. GetFormDocumentLinkTag generates a complete but basic set of HREF content tags that cannot be further modified. GetFormDocumentURL generates a URL that can be used within a set of HREF content tags that you create manually, thereby allowing more flexibility in how the content tags are set up.

  • 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.

  • GetFormDocumentLinkTag is a non-volatile function.

Examples

=GetFormDocumentLinkTag("Open KPI dashboard", "\Axiom\Reports Library\Dashboards\kpi_dashboard.xlsx")

This example creates a content tag that will render as a hyperlink to the specified document, and open it as an Axiom form. Although you can specify the file path (or document ID) for the second parameter directly, in many cases you will use this function in conjunction with the GetPlanFilePath function, to look up the appropriate file path for a plan file. For example:

=GetFormDocumentLinkTag("Open plan file for Dept 3000", GetPlanFilePath("Budget 2020",3000), , TRUE)

This example creates a content tag that will render as a hyperlink to the plan file for department 3000 in file group Budget 2020, and open it as an Axiom form. In the spreadsheet, the resulting tag will look something like the following:

[href=http://servername/Axiom/forms/psMRBzzjVcs0yAjqyOAyZQ__; Text=Open plan file for Dept 3000; UseNewWindow=true]

In the rendered Axiom form, the resulting hyperlink will look something like the following (assuming the appropriate cell formatting):

Open plan file for Dept 3000

=GetFormDocumentLinkTag("Open KPI dashboard", 93, "GL;Dept.Region='North'")

This example is the same as the first example, except:

  • A document ID is used instead of a file path to identify the file.
  • A filter is applied to limit the data in the Axiom form to data from the North region.

=GetFormDocumentLinkTag("Print plan file", GetPlanFilePath("Budget 2020", 3000), , TRUE, TRUE)

In this example, the GeneratePDF parameter is used to automatically generate a PDF for printing. The content tags that result from this function will automatically append /pdf to the end of the URL, such as:

[href=http://servername/Axiom/forms/psMRBzzjVcs0yAjqyOAyZQ__/pdf; Text=Print plan file; UseNewWindow=true]

=GetFormDocumentLinkTag("See Detail", 93, , True, , "Region=West;Category=Payroll")

In this example, values for the variables Region and Category are being sent to the target form. If the target form uses GetDocumentInfo functions to return the variable values, the values West and Payroll will be returned and can be used to impact data queries in the file (or for some other purpose). Additionally, the OpenInNewWindow parameter is used to open the target form in a new window.