cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

heramb_sawant
Organizer

In my workflow 

Task_1 is  DQL type task  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 

2 REPLIES 2

heramb_sawant
Organizer

any help would be appreciated . 

anapaulasalas
Dynatrace Advocate
Dynatrace Advocate

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:

https://docs.dynatrace.com/docs/shortlink/workflows-building#task-conditions

https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/reference#expressions

 

Please let me know if I can help you further. 

Featured Posts