taskUrl

taskUrl, function

def pure taskUrl(task: number): text
def pure taskUrl(task: number, activity: number): text

Returns a URL pointing to a Discuss task. The two-argument overload points to a specific activity within the task.

Examples

show menu "Specifications" with
  "General product rules" { href: #(taskUrl(1000)) }
  "Category overrides"    { href: #(taskUrl(2000)) }
table Items = with
  [| "A001" as Id, "B2B" as Category |]
  [| "A002"      , "B2B"             |]
  [| "B123"      , "B2C"             |]
  [| "C221"      , "Other"           |]

Items.Decision, Items.Reason = match Items.Category with
  "B2B" -> (true, taskUrl(1000, 123))
  "B2C" -> (false, taskUrl(1000, 215))
  ..    -> (false, "")

show table "Catalog" with
  Items.Id
  Items.Category
  Items.Decision { href: #[Items.Reason] }

Remarks

This function cannot be called on try.lokad.com.

User Contributed Notes
0 notes + add a note