Read Task
Built-in Tasks is a concept feature. It's still being developed and can change before it's released. It's available only when the site's license includes the Concept feature Tasks.
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens
Reads a task the current user can see into tokens, with what the current user may do with it.
Typical Use Cases
- Show one task on your own page, for example from a link that carries the task's id
- Show only the buttons the user may use, such as Complete or Cancel
- Read a task's status or outcome in a workflow before deciding what to do next
Don't use it to
- List several tasks. Use Get Tasks instead, or the Tasks Data Source in a grid.
- Read a task in a task type's event or escalation workflow. The task's fields are already in the
[Task:...]tokens there.
Related Actions
| Action Name | Description |
|---|---|
| Get Tasks | Lists the tasks the current user can see, filtered. |
| Complete Task | Completes a task with an outcome. |
| Escalate Task | Runs the task's next escalation step now. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Task Id | The id of the task, for example [QueryString:TaskId] on a page opened with ?TaskId=12, or [Id] in a grid row. | Yes | empty | Yes |
| Output Token Name | The name of a token, without brackets, that receives the task, for example Task. See Output. | No | empty | Yes, to get the tokens |
| Show Unavailable | When checked, a task the user can't see, or that doesn't exist, doesn't fail the action. The action sets [<Output Token Name>:Unavailable] to True and the message "This task isn't available to you." in [<Output Token Name>:SummaryHtml] instead. The task panel of My Tasks uses it for links to a task. | No | false | No |
| On Error | Actions to run when the task can't be read. [ExceptionMessage] holds the reason. See Errors and refusals. | No | empty | No |
Output
The task's fields, as every Tasks action publishes them:
| Token | Description |
|---|---|
[<Output Token Name>] | The id of the task. |
[<Output Token Name>:Id], [<Output Token Name>:Title], [<Output Token Name>:Status] and the other fields | The task's fields. See Task fields in tokens. |
And these, for showing the task to the current user:
| Token | Description |
|---|---|
[<Output Token Name>:SummaryHtml] | The task as the task panel shows it: title, type, status, due date, assignee, candidate roles, priority, description and the records it's about, with links to their Detail pages. It's HTML, and every value in it is encoded. Dates show in the user's time zone. |
[<Output Token Name>:TypeName] | The name of the task type. |
[<Output Token Name>:StatusName] | Open, In progress, Completed or Cancelled. |
[<Output Token Name>:AssigneeName] | The display name of the assignee. Empty while the task is unassigned. |
[<Output Token Name>:OutcomeCount] | The number of outcomes of the task type. |
[<Output Token Name>:CanClaim] | True when the user may assign the task to themselves. |
[<Output Token Name>:CanStart] | True when the user may start the task. |
[<Output Token Name>:CanRelease] | True when the user may unassign the task. |
[<Output Token Name>:CanDelegate] | True when the user may delegate the task to a member of its candidate roles, and someone else is in them. |
[<Output Token Name>:CanComplete] | True when the user may complete the task, also when they must assign it to themselves first. |
[<Output Token Name>:CanEscalate] | True when the user may escalate the task. |
[<Output Token Name>:CanReassign] | True when the user may reassign the task. |
[<Output Token Name>:CanCancel] | True when the user may cancel the task. |
[<Output Token Name>:CanChangeDueDate] | True when the user may change the due date. |
[<Output Token Name>:EscalateHtml] | What Escalate would run: the next step, its usual time and its workflow, as encoded HTML. Empty when CanEscalate is False. |
[<Output Token Name>:HasRecordForm], [<Output Token Name>:RecordFormHtml], [<Output Token Name>:RecordFormJson] | The type's attached record form for this user, which the task panel shows. See Complete Task. |
[<Output Token Name>:Unavailable] | False. True only with Show Unavailable, when the task isn't available. |
The Can... tokens are True or False.
Considerations
- Who may read. Anyone who can see the task: its assignee, its creator, the user who delegated it, members of its candidate roles while it's unassigned, Task administrators of its type and superusers. See Who may do what.
- With Show Unavailable, the action doesn't fail on a task the user can't see, on a task that doesn't exist, or on a Task Id that isn't a number. Only the tokens of the second table are set:
UnavailableisTrue,SummaryHtmlholds the message, theCan...tokens areFalseand the names are empty. The task's fields aren't set. - The Can... tokens are a snapshot. They say what the user may do when the task is read. The actions check the rules again when they run.
- Without an Output Token Name, the action only checks that the user can see the task.
Without Show Unavailable, the action fails with Task #<id> was not found or you cannot see it. or "<value>" is not a task id. See Errors and refusals.
Examples
To understand how to use the below examples, please see Running Examples.
1. Show a task from a link
Add this action to the On Preinit event of a form on a page that's opened with ?TaskId=12, so the fields can use the tokens. Show [Task:SummaryHtml] in a static text field of the form. When the user can't see the task, the field says "This task isn't available to you." instead of failing.
{
"Title": "Read Task",
"ActionType": "PlantAnApp.Tasks.ReadTask",
"Description": "Read the task from the link",
"Condition": null,
"Parameters": {
"TaskId": "[QueryString:TaskId]",
"OutputToken": "Task",
"ShowUnavailable": true,
"OnError": []
}
}
2. Refuse when the user may not cancel
Run these actions before your own cancel actions. The first reads the task. The second shows a message and ends execution when the user may not cancel it.
[
{
"Title": "Read Task",
"ActionType": "PlantAnApp.Tasks.ReadTask",
"Description": "Read the task",
"Condition": null,
"Parameters": {
"TaskId": "[TaskId]",
"OutputToken": "Task",
"ShowUnavailable": false,
"OnError": []
}
},
{
"Title": "Display Error Message",
"ActionType": "ShowError",
"Description": "The user may not cancel this task",
"Condition": "[Task:CanCancel] == \"False\"",
"Parameters": {
"Message": "<p>Only the creator or a Task administrator can cancel this task.</p>"
}
}
]
Revised 11/12/2026