sliceSearchUrl

sliceSearchUrl, function

def pure sliceSearchUrl(script: number, pattern: text, tab: text): text
def pure sliceSearchUrl(script: number, pattern: text): text
def pure sliceSearchUrl(pattern: text, tab: text): text
def pure sliceSearchUrl(pattern: text): text

Returns a URL (as text) pointing to a slice in a dashboard.

Example

projectId = 12345

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

Queries.Url = sliceSearchUrl(projectId, Queries.Query, "Overview")

show table "Slice links" with
  Queries.Query { href: #[Queries.Url] }
  Queries.Url

Remarks

If multiple slices match pattern, the first match (lexicographically by name) is used. The overloads without script target the latest dashboard produced by the current script and cannot be used in modules or user-defined functions. This function cannot be called on try.lokad.com.

User Contributed Notes
0 notes + add a note