# How to write condition in task to check null value while running workflow

**URL:** <https://community.dynatrace.com/t/how-to-write-condition-in-task-to-check-null-value-while-running-workflow/53327>\
**Category:** Automations\
**Tags:** dql, workflows\
**Created:** [September 12, 2025, 2:26pm UTC](https://community.dynatrace.com/t/how-to-write-condition-in-task-to-check-null-value-while-running-workflow/53327 "2025-09-12T14:26:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![heramb\_sawant](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@heramb\_sawant](https://community.dynatrace.com/u/heramb_sawant)\
**Post date:** [September 12, 2025, 2:26pm UTC](https://community.dynatrace.com/t/how-to-write-condition-in-task-to-check-null-value-while-running-workflow/53327/1 "2025-09-12T14:26:14Z")

</div>

**In my workflow**

Task\_1 is&nbsp; DQL type task&nbsp; which might have null values in output , like given below

**[**  
**{**  
**“name” : “ABC”,**  
**“age”: 10,**  
**“height”: 6**  
**}**  
**]**

**or**

**[**  
**{**  
**“name” : “ABC”,**  
**“age”: 10,**  
**“height”: null**  
**}**  
**]**

I would like to run next task only if height value is no null

How Can I write condition ??

Thanks in advance

Heramb

---

<div class="post-metadata">

**Author:** ![heramb\_sawant](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@heramb\_sawant](https://community.dynatrace.com/u/heramb_sawant)\
**Post date:** [September 12, 2025, 3:24pm UTC](https://community.dynatrace.com/t/how-to-write-condition-in-task-to-check-null-value-while-running-workflow/53327/2 "2025-09-12T15:24:09Z")

</div>

any help would be appreciated .

---

<div class="post-metadata">

**Author:** ![anapaulasalas](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@anapaulasalas](https://community.dynatrace.com/u/anapaulasalas)\
**Post date:** [September 12, 2025, 9:34pm UTC](https://community.dynatrace.com/t/how-to-write-condition-in-task-to-check-null-value-while-running-workflow/53327/3 "2025-09-12T21:34:39Z")

</div>

Hello,

On the next task, under conditions, try something like this:

{{ result(“Task\_1”).records[0].height != None}}

Change “Task\_1” if that’s not the correct name of the DQL task.

Here are some links that might be useful for you:

> **[Build workflows](https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/build)**
>
> Build and edit workflows in Dynatrace Workflows.

> **[Expressions - Jinja expressions for Workflows](https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/reference#expressions)**
>
> Workflows uses the Jinja﻿ templating engine to allow for dynamic configuration in Workflows. Those expressions provide, for example, access to execution parameters, schedule information, event context. | Get to know the Jinja templating and...

Please let me know if I can help you further.

---

<div class="post-metadata">

**Author:** ![heramb\_sawant](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@heramb\_sawant](https://community.dynatrace.com/u/heramb_sawant)\
**Post date:** [September 25, 2025, 1:50pm UTC](https://community.dynatrace.com/t/how-to-write-condition-in-task-to-check-null-value-while-running-workflow/53327/4 "2025-09-25T13:50:37Z")

</div>

Thanks&nbsp;[anapaulasalas](https://community.dynatrace.com/user/84638).

It was helpful.
