# WORKFLOW: get data from a previous dql task to a dql or javascript task

**URL:** <https://community.dynatrace.com/t/workflow-get-data-from-a-previous-dql-task-to-a-dql-or-javascript-task/46195>\
**Category:** Automations\
**Tags:** workflows, automations\
**Created:** [June 18, 2024, 10:32pm UTC](https://community.dynatrace.com/t/workflow-get-data-from-a-previous-dql-task-to-a-dql-or-javascript-task/46195 "2024-06-18T22:32:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JhonU](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@JhonU](https://community.dynatrace.com/u/JhonU)\
**Post date:** [June 18, 2024, 10:32pm UTC](https://community.dynatrace.com/t/workflow-get-data-from-a-previous-dql-task-to-a-dql-or-javascript-task/46195/1 "2024-06-18T22:32:46Z")

</div>

Hello everyone, maybe you can guide me. I have a problem. I don’t know how I can call the data that two dql code tasks return to me, whether to use it in another dql or javascript task. I’ve tried using regular expressions, but I can’t figure out how to integrate them into code. DQL from a previous task.  
For example, the time\_validation task returns the hour parameter that I need to use for aggregations.

 ![JhonU_0-1718749012894.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/3/73541e796d6f0ee54c8f03d2fbd4e406fcddb45c.png)

---

<div class="post-metadata">

**Author:** ![jaume\_reverte](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jaume_reverte/32/1479_2.png) [@jaume\_reverte](https://community.dynatrace.com/u/jaume_reverte)\
**Post date:** [August 22, 2024, 6:54am UTC](https://community.dynatrace.com/t/workflow-get-data-from-a-previous-dql-task-to-a-dql-or-javascript-task/46195/2 "2024-08-22T06:54:11Z")

</div>

Hello Jhon,

You can achieve that using&nbsp;{{result(\<taskname\>)}}.

In the case that you want to use the returned information inside a JavaScript task, you need something like:&nbsp;  
var ex = await execution(execution\_id)  
var myResult = await ex.result(‘time\_validation’);  
You can check the official documentation [link](https://docs.dynatrace.com/docs/platform-modules/automations/workflows/default-workflow-actions/run-javascript-workflow-action#task-result) for Javascript

Hope you a good monitoring!
