AX2366

GetFormResourceLinkTag function

Generates a hyperlink tag to a non-Axiom file 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 specifically intended for situations where you are using an Axiom query to bring in a list of plan file attachments, and you want to generate hyperlinks to those files so that the user can open them from the Axiom form. You would then display the hyperlinks in the form using a Formatted Grid component.

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.

NOTE: This function creates a hyperlink that opens the specified file in its native format—for example, in Word for DOCX files. Therefore although the target file must reside within the Axiom file system, this function should not be used to link to Axiom files such as reports, because the file would be opened in a regular Excel instance instead of within Axiom Software. This function should only be used to link to non-Axiom files.

Syntax

GetFormResourceLinkTag("DisplayText", DocIDorPath)

Parameter Description
DisplayText

The display text for the hyperlink.

The appearance of the hyperlink depends on the formatting of the cell. If you want the hyperlink to appear in blue font with an underline, you must format the cell that way.

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\File Groups\Budget 2020\Plan File Attachments\24000\Proposal.pdf.

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

  • Both GetFormResourceLinkTag and GetFormResourceURL can be used to generate a hyperlink to a plan file attachment within a Formatted Grid component. GetFormResourceLinkTag generates a complete but basic set of Href content tags that cannot be further modified. GetFormResourceURL 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.

  • The hyperlinked document always opens in a new window.

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

  • GetFormResourceLinkTag is a non-volatile function.

Examples

=GetFormResourceLinkTag("Open file",930)

This example creates an HTML tag that will render as a hyperlink to document ID 930 when the file is viewed as an Axiom form. In the spreadsheet, the resulting HTML will look something like the following:

[href=http://servername/Axiom/resource/psMRBzzjVcs0yAjqyOAyZQ__; Text=Open file]

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

Open file

When using the function within an Axiom query to automatically generate links, the function might be structured as follows:

=GetFormResourceLinkTag("Open "&F4,S4)

Where column F contains the names of the documents and column S contains the corresponding document IDs or file paths.