> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# viewData

> Use the viewData task to display a form to users containing job data and enable decision-making for the next workflow step.

The `viewData` task displays a form to users containing job data and enables decision-making for the next workflow step.

## Potential use cases

Use `viewData` for approval workflows where someone needs to review data and approve or reject, or for debugging and monitoring where operators need to see workflow state and decide whether to continue or retry steps.

## Properties

| Incoming      | Type   | Description                                                                                                                                                                                                       |
| :------------ | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `header`      | String | Required. Bold header text displayed at the top of the form.                                                                                                                                                      |
| `message`     | Any    | Required. Informational text that helps users make their selection. Accepts plain text, HTML, and CSS.                                                                                                            |
| `body`        | Any    | Required. Main content area displaying data or instructions. Accepts plain text, HTML, and CSS. You can reference JSON variables from previous tasks or use variable substitution with the `variables` parameter. |
| `variables`   | Object | Variables used in the body. Each key is a variable name; each value is the replacement string. Reference variables in `body` using the syntax `<!variableName!>`.                                                 |
| `btn_success` | String | Required. Label text for the success button.                                                                                                                                                                      |
| `btn_failure` | String | Required. Label text for the failure button.                                                                                                                                                                      |

| Outgoing | Description                                                                                                                                                      |
| :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| none     | The task produces no direct output variables. User selection of `btn_success` or `btn_failure` triggers the corresponding **Success** or **Failure** transition. |

## How to configure

This example configures a `viewData` task that displays current time information and allows workflow re-execution. It uses a `getTime` task as a prerequisite. See the [getTime](/itential-platform/studio/tasks/reference/get-time) task reference for more information.

![](/_fern-img/6fd228274a05a22fe7c5aae4d1a7639879dba1b15afbc2dd505220e07af9b93c.webp)

#### Add the tasks

In your workflow canvas, add `getTime` and `viewData` tasks as shown above.

#### Configure viewData inputs

Select the `viewData` task and configure the following:

* **header**: `The Current Time is...`
* **message**: `When this Automation was executed, the time was:`
* **body**: Set Reference task to `getTime` and Reference variable to `time`
* **btn\_success**: `I am done.`
* **btn\_failure**: `Do it again.`

![](/_fern-img/61026b4529410d49d12a337aa442e556d29c1b6cb5c1b08cadc8b04b48e6fc9f.webp)![](/_fern-img/7b60cf1c6dca9c3989708c6e8718bb8f9e964e755bfe9fe6668dc27557d6df0a.webp)![](/_fern-img/2320a1568f803b8637239dafc8b65dfb1aa4773198c874d50abb874b022e870e.webp)

#### Configure transitions

Configure transitions between tasks as shown in the canvas figure above.

![](/_fern-img/23feff2784e892dc94ecb2fac91326ddb6c6272c03ae29a66eae74c2726342d0.webp)

When the workflow reaches the `viewData` task, a Work Task link appears in Jobs (Operations Manager). Click the link to open the form and make a selection.

With this design, clicking **I am done** ends the job. Clicking **Do it again** follows the revert failure transition back to `getTime`, which re-runs and presents a new timestamp. This loop continues until the user clicks **I am done** or cancels the task. If the user clicks **Cancel** on the form, the modal closes but the job continues running until worked or cancelled.

![](/_fern-img/a46c6c6749e7f7c846c0228a5fc4bf85d04544c902ca3b6836b0a31566d64ef0.webp)

## Example — using the variables parameter

The `variables` field lets you pass JSON properties (strings) that can be referenced in the `body` of the `viewData` task usingItential Platform-specific syntax: `<!parameterName!>`.

In the configuration example above, instead of passing the `getTime` response directly as the `body`, you can use it as the input `variables`. Update the `body` to something like `The current time is <!time!>` and set `variables` to the `getTime` **task**. The `<!time!>` placeholder is replaced with the actual time value at runtime.

![](/_fern-img/a554c4b71d59f4943d4abad7a48c1b7f22aafc4aae6cc602108553dc7caef22a.webp)

Once the automation completes, a Work Task link (Start Auto-Work) appears on the `viewData` task in Jobs (Operations Manager). Clicking the link opens the form prepared with the variable-substituted content.

![](/_fern-img/ef3bfbf4eef59980d3abba7132402eec738788f0c3839a1208ab9fa7169c102b.webp)

## Related reading

For related information, see the [ViewData API reference](https://apidocs.itential.com/api/app-workflow_engine/ViewData/).