# What is the syntax for custom conditions in workflows?

**URL:** <https://community.dynatrace.com/t/what-is-the-syntax-for-custom-conditions-in-workflows/40239>\
**Category:** Automations\
**Tags:** latest-dynatrace, workflows\
**Created:** [June 16, 2023, 12:41am UTC](https://community.dynatrace.com/t/what-is-the-syntax-for-custom-conditions-in-workflows/40239 "2023-06-16T00:41:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysulkin](https://avatars.discourse-cdn.com/v4/letter/y/77aa72/32.png) [@ysulkin](https://community.dynatrace.com/u/ysulkin)\
**Post date:** [June 16, 2023, 12:41am UTC](https://community.dynatrace.com/t/what-is-the-syntax-for-custom-conditions-in-workflows/40239/1 "2023-06-16T00:41:57Z")

</div>

Hi, I can’t figure out the syntax for adding a Custom Condition in workflows.

I’ve tried using expressions which have been working elsewhere like

```javascript
"{{event()['event.status']" == 'ACTIVE'`

```

, but the expression is not being evaluated.

Can anyone tell me the right syntax for this, or show me other examples of how to use Conditions?

 ![ysulkin_0-1686875864762.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/c/fc28f1d0e7b40e8f3c0258063dbac922aa6328ea.png)

 ![ysulkin_1-1686875888146.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/9/790c6389ae227cdbb8be96045f98afdb9f8f329e.png)

---

<div class="post-metadata">

**Author:** ![michal\_zawislak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michal_zawislak/32/13613_2.png) [@michal\_zawislak](https://community.dynatrace.com/u/michal_zawislak)\
**Post date:** [June 16, 2023, 6:59am UTC](https://community.dynatrace.com/t/what-is-the-syntax-for-custom-conditions-in-workflows/40239/2 "2023-06-16T06:59:25Z")

</div>

Hi&nbsp;[@ysulkin](https://community.dynatrace.com/user/63451),

What you have is almost correct. The custom condition must be an expression as a whole as it should evaluate to a boolean i.e.

```auto
{{ event()["event.status"] == "ACTIVE" }}

```

 ![michal_zawislak_0-1686898714526.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/a/fa43c1d76b581db71c8850231f173e252160d70d.png)

 ![michal_zawislak_1-1686898719757.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/0/d07c2b191210389cb12a8393de7960504a60f585.png)

---

<div class="post-metadata">

**Author:** ![Alejandro\_hdez](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@Alejandro\_hdez](https://community.dynatrace.com/u/Alejandro_hdez)\
**Post date:** [November 19, 2023, 7:23pm UTC](https://community.dynatrace.com/t/what-is-the-syntax-for-custom-conditions-in-workflows/40239/3 "2023-11-19T19:23:30Z")

</div>

Hello, where can I find documentation on how to use custom conditions, I need to use a condition for a workflow using DQL, for instance, if I get more than 5 records for an IP, it will creates an issue on Jira otherwise ends the task

---

<div class="post-metadata">

**Author:** ![michal\_zawislak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michal_zawislak/32/13613_2.png) [@michal\_zawislak](https://community.dynatrace.com/u/michal_zawislak)\
**Post date:** [November 20, 2023, 8:01am UTC](https://community.dynatrace.com/t/what-is-the-syntax-for-custom-conditions-in-workflows/40239/4 "2023-11-20T08:01:29Z")

</div>

Hi&nbsp;[@Alejandro\_hdez](https://community.dynatrace.com/user/68853),

Currently, there isn’t specific documentation dedicated to custom conditions. These typically come in the form of Jinja [expressions](https://docs.dynatrace.com/docs/platform-modules/cloud-automation/workflows/reference#filters) with an optional condition.

For example, your condition might be:

```auto
{{ result("execute_dql_query_1").records | length > 5 }}

```

Please let me know if I can help you further.
