URL

URL, concepts

Envision allows representing Uniform Resource Locators (URLs) as values of the text type.

To create clickable link to a given URL, use the href StyleCode property:

TheURL = "https://en.wikipedia.org/wiki/Stockout"
show label "Learn more about Stockouts" { href: #(TheURL) } 

While it is safe to hard-code URLs to external websites directly in an Envision script, it is not recommended to hard-code URLs to pages in the Lokad application (such as the URLs of dashboards, scripts, files or images), as those are subject to change. Instead, please call one of the following functions to produce the correct URL on the fly:

Function Purpose
currentDashUrl() Open the dashboard that was produced by the executing run.
dashUrl() Open the latest dashboard of a script.
downloadUrl() Download a file stored in the Lokad application.
fileUrl() Open the folder containing a file in the Lokad file explorer.
folderUrl() Open a folder in the Lokad file explorer.
previewUrl() Open a preview page for a file.
sequenceUrl() Open the page of a script sequence.
sliceSearchUrl() Open a specific slice of a dashboard, if it exists.
sliceUrl() Open a specific slice of the dashboard produced by the executing run.
syncUrl() Open the page of a sync script.
taskUrl() Open a Discuss task.

Note that all of the above functions produce URLs that start with ~/. This is automatically replaced with the correct prefix (of the form https://go.lokad.com/<ACCOUNT>/) when displayed with href. These URLs cannot be used to create cross-account links.

User Contributed Notes
0 notes + add a note