# Trouble getting results from a previous task

**URL:** <https://community.dynatrace.com/t/trouble-getting-results-from-a-previous-task/49279>\
**Category:** DQL\
**Tags:** dql\
**Created:** [December 10, 2024, 9:37am UTC](https://community.dynatrace.com/t/trouble-getting-results-from-a-previous-task/49279 "2024-12-10T09:37:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rseibert1](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@rseibert1](https://community.dynatrace.com/u/rseibert1)\
**Post date:** [December 10, 2024, 9:37am UTC](https://community.dynatrace.com/t/trouble-getting-results-from-a-previous-task/49279/1 "2024-12-10T09:37:42Z")

</div>

The below is giving a parse error, though it seems to be pulling a list of Id’s that seems to be formatted wrong?Trying to pull the list of Id’s from the task.{% for record in result(“unhealthy\_workers\_table”)[“records”] %}Id : {{ record.Id }}{% endfor %}[ERROR] 400: PARSE\_ERROR. exceptionType: “DQL-ERROR-PARSING”. syntaxErrorPosition: {“start”:{“column”:5,“index”:4,“line”:1},“end”:{“column”:5,“index”:4,“line”:1}}. errorType: “PARSE\_ERROR”. errorMessage: “`:` isn’t allowed here. Please check the autocomplete suggestions before the error for alternative options.”. arguments: [“`:`”]. queryString: “\tId : Workers-22\n\tId : Workers-23\n\tId : Workers-465\n\tId : Workers-349\n\tId : Workers-781\n\tId : Workers-621\n\tId : Workers-721\n\tId : Workers-722\n\tId : Workers-502\n\tId : Workers-501\n\tId : Workers-245\n\tId : Workers-84\n\tId : Workers-85\n\tId : Workers-86\n\tId : Workers-87\n\tId : Workers-143\n\tId : Workers-121\n\tId : Workers-62\n\tId : Workers-141\n\tId : Workers-142\n\tId : Workers-181\n\tId : Workers-182\n\tId : Workers-161\n\tId : Workers-162\n\tId : Workers-201\n\tId : Workers-202\n\tId : Workers-351\n\tId : Workers-352\n\tId : Workers-353\n\tId : Workers-354\n\tId : Workers-341\n\tId : Workers-342\n\tId : Workers-343\n\tId : Workers-344\n\tId : Workers-532\n\tId : Workers-321\n\tId&nbsp; ---output truncated------------------------------------------------------Workers-304\n”. errorMessageFormatSpecifierTypes: [“INPUT\_QUERY\_PART”]. errorMessageFormat: “%1$s isn’t allowed here. Please check the autocomplete suggestions before the error for alternative options.”. queryId: "ddc63a6a-cf66-4e8a-98fb-1f795023b5fd"Here is a sample from the unhealthy\_workers\_table:

[  
{  
“Id”: “Workers-22”,  
“SpaceId”: “Spaces-1”,  
“timestamp”: “2024-12-04T11:39:52.487000000Z”,  
“HealthStatus”: “HasWarnings”,  
“StatusSummary”: “This machine is running an old version of Tentacle (6.1.1403).”,  
“WorkerPoolIds”: [  
“WorkerPools-42”  
],  
“OperatingSystem”: “Microsoft Windows Server 2019 Standard 10.0.17763.0”,  
“HasLatestCalamari”: true  
},

There is no error in the previous DQL from what I can see, it formats nicely in notebook and looks like:

 ![rseibert1_0-1733823375423.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/eab460cc6b179f1684f30d9a61d9fa12e8c861e8.png)

---

<div class="post-metadata">

**Author:** ![paolo\_fumanelli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/paolo_fumanelli/32/1037_2.png) [@paolo\_fumanelli](https://community.dynatrace.com/u/paolo_fumanelli)\
**Post date:** [December 10, 2024, 2:52pm UTC](https://community.dynatrace.com/t/trouble-getting-results-from-a-previous-task/49279/2 "2024-12-10T14:52:20Z")

</div>

Hi, I had a similar issue by reading a json that seemed perfectly formatted but ended up in a similar error. I could fix it in this way:

data json: “”“{{ result(“unhealthy\_workers\_table”)[“records”] | replace(”'“, “\””)}}“”"

because " was the interpreted as '.

I tested it with your input (just kept 1 record):  
data json:“”"  
{  
“Id”: “Workers-22”,  
“SpaceId”: “Spaces-1”,  
“timestamp”: “2024-12-04T11:39:52.487000000Z”,  
“HealthStatus”: “HasWarnings”,  
“StatusSummary”: “This machine is running an old version of Tentacle (6.1.1403).”,  
“WorkerPoolIds”: [  
“WorkerPools-42”  
],  
“OperatingSystem”: “Microsoft Windows Server 2019 Standard 10.0.17763.0”,  
“HasLatestCalamari”: true  
}“”"

But still it’s not working. I found out that somehow the latest boolean value is disturbing the result reading.

If you modify to 0=false, 1=true it’s going to work.

Very strange behaviour, both for "/’ issue and for boolean one.

Hope this helps.  
PF

---

<div class="post-metadata">

**Author:** ![rseibert1](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@rseibert1](https://community.dynatrace.com/u/rseibert1)\
**Post date:** [December 14, 2024, 11:31am UTC](https://community.dynatrace.com/t/trouble-getting-results-from-a-previous-task/49279/3 "2024-12-14T11:31:43Z")

</div>

Thanks Paolo, that helps a lot, I made a shorter DQL that omitted the field with the boolean and it works!

---

<div class="post-metadata">

**Author:** ![rseibert1](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@rseibert1](https://community.dynatrace.com/u/rseibert1)\
**Post date:** [December 16, 2024, 2:24pm UTC](https://community.dynatrace.com/t/trouble-getting-results-from-a-previous-task/49279/4 "2024-12-16T14:24:42Z")

</div>

Hi Paolo,

I am curious how you found the "&nbsp; was being interpreted as ’ ?&nbsp; I am running into situations where some of my fields can be pulled in from previous tasks and some cannot.

I am especially seeing this trying to pull in records from a DQL execution into a JavaScript task.

---

<div class="post-metadata">

**Author:** ![paolo\_fumanelli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/paolo_fumanelli/32/1037_2.png) [@paolo\_fumanelli](https://community.dynatrace.com/u/paolo_fumanelli)\
**Post date:** [January 9, 2025, 9:01am UTC](https://community.dynatrace.com/t/trouble-getting-results-from-a-previous-task/49279/5 "2025-01-09T09:01:01Z")

</div>

I noticed that somehow those double quotes became single quotes when checking out task output after execution, at least in some cases.
