sliceSearchUrl

sliceSearchUrl(project: number, pattern: text) 🡒 text, pure function

Returns the URL, encoded as a text value, that points to a specific slice within a specific dashboard. The dashboard is identified by its project identifier passed as the first argument. The slice is identified by the second argument which acts as a query performed on the dashboard. If there are multiple matching slices, the first slice (name-wise) is selected. The returned text value that contains an URL can be rendered as a link through the StyleCode element {text: "link"}.

Example:

projectId = 12345 // found in the URL of the project

table Queries = with
  [| as Q |]
  [| "pant" |]
  [|  "hat" |]
  [|  "cap" |]

show table "" a1d3 with
  Queries.Q
  sliceSearchUrl(projectId, Queries.Q) { text: "link" }
  sliceSearchUrl(projectId, Queries.Q) { text: "link"; textLinkName: #(Queries.Q) }