Returns a hyperlink composed of the specified URL and clickable text.
HYPERLINK()
function in automation templates.Sample app
See an example of HYPERLINK()
in the Hyperlinks sample app.
Sample usage
HYPERLINK("https://google.com", "Google")
returns Google
HYPERLINK("https://appsheet.com", "AppSheet home page")
returns AppSheet home page
HYPERLINK("https://appsheet.com/samples/How-to-link-to-a-URL-with-custom-text?appGuidString=3f55edfc-aa53-47fc-a206-469720f10b13", "Hyperlinks sample app")
returns Hyperlinks sample app
HYPERLINK([Vendor Site], [Vendor Name])
returns a hyperlink pointing to the URL in the Vendor Site
column, with clickable text from the Vendor Name
column.
Encode text for URL
Certain characters, such as ampersand (&
), colon (:
), slash (/
), and even a space, have special meanings within URLs. Text included in URLs that contains special characters should be "encoded" to remove the special meaning and avoid problems. The ENCODEURL()
function is provided for this purpose.
HYPERLINK(
CONCATENATE(
"https://google.com/search?q=",
ENCODEURL([Product Name])
),
("Search for " & [Product Name] & " on Google")
)
HYPERLINK(..., ...)
creates a hyperlink to the given target URL and with the given clickable text.CONCATENATE(..., ...)
computes the target URL by combining the given values."https://google.com/search?q="
: the initial part of the target URL. This part is already properly encoded as a URL, soENCODEURL()
is not needed.ENCODEURL([Product Name])
encodes theProduct Name
column value, ensuring the special meaning is removed from any special characters the value may contain.("Search for " & [Product Name] & " on Google")
assembles the clickable text for the hyperlink from the given components.ENCODEURL()
is not needed here because the clickable text is not part of the URL. Equivalent toCONCATENATE("Search for ", [Product Name], " on Google")
.
See also: CONCATENATE()
, ENCODEURL()
Syntax
HYPERLINK(url, text)
url
- Any textual type. Specifies the URL to which the user is to be sent upon clicking the link. No processing of the URL is done in constructing the hyperlink; the URL should be complete and valid.text
-Any textual type. Specifies the text the user will see and click on.