AX1006

GetFormDocumentURL function

Generates a URL to a form-enabled file within the Axiom file system, to open the file as an Axiom form instead of as a spreadsheet. If this URL is used in content tags within a Formatted Grid component, it will result in a clickable hyperlink to open the file from within an Axiom form.

This function is specifically intended for situations where you are linking to other Axiom forms from within an Axiom form.

Syntax

GetFormDocumentURL(DocIDorPath, "SheetFilter", "Variables")

Parameter Description

DocIDorPath

The file for which you want to return a URL. 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).

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.

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 GL2021), 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 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.

  • GetFormDocumentURL is a non-volatile function.

Examples

=GetFormDocumentURL(930)

This example generates a URL to an Axiom form within the Axiom file system. If used on its own like this, you could copy the URL into a Hyperlink component. However in most cases you would use the function as part of content tags within a Formatted Grid component. For example:

="[Href="&GetFormDocumentURL(G23)&";Text=Open dashboard;UseNewWindow=True]"

In this case, the GetFormDocumentURL function is used within a formula to create a full string of content tags. The function is looking up the file path or document ID from cell G23.

The content tags do not have any effect within the spreadsheet itself. In order to generate a hyperlink, the content tags would be used within a cell that is part of a data source for a Formatted Grid component. When the source file is viewed as an Axiom form, the tags would be rendered as a clickable hyperlink within the grid.

=GetFormDocumentURL("\Axiom\Reports Library\Forms\Dashboard.xlsx", "Dept;Dept.Region='US West'")

This example is the same as the first example, except in this case a filter is applied to limit the data in the Axiom form when it is opened via URL. Also, a full file path is used instead of a document ID to identify the file.

=GetFormDocumentURL(930, , "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).