# How to reference return from previous task

**URL:** <https://community.dynatrace.com/t/how-to-reference-return-from-previous-task/46371>\
**Category:** Automations\
**Tags:** workflows, automations\
**Created:** [June 28, 2024, 12:24pm UTC](https://community.dynatrace.com/t/how-to-reference-return-from-previous-task/46371 "2024-06-28T12:24:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [June 28, 2024, 12:24pm UTC](https://community.dynatrace.com/t/how-to-reference-return-from-previous-task/46371/1 "2024-06-28T12:24:48Z")

</div>

![henk_stobbe_0-1719577385592.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/5a2d86ea35dfbe746f3b358fc87cf036dbc3bdd0.png)

So what is the name in javascript when when you want to reference in the next task?

KR Henk

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [August 1, 2024, 11:00am UTC](https://community.dynatrace.com/t/how-to-reference-return-from-previous-task/46371/2 "2024-08-01T11:00:16Z")

</div>

You will need to reference the task via the name/id.

The code to copy/paste:

```markup
var task_info = await fetch(`/platform/automation/v0.1/executions/${execution_id}/tasks/get_top10_error_logs`)
  var error_logs_task = await task_info.json()

```

 ![mark_bley_0-1722509920444.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/a/8aabbc654247ef5a925fdf7d5cedd7216a01f9da.png)
