# Static list of environment as a variable for segment

**URL:** <https://community.dynatrace.com/t/static-list-of-environment-as-a-variable-for-segment/54333>\
**Category:** Container platforms\
**Tags:** openshift, segments, kubernetes\
**Created:** [December 8, 2025, 10:31pm UTC](https://community.dynatrace.com/t/static-list-of-environment-as-a-variable-for-segment/54333 "2025-12-08T22:31:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![susmita\_k](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@susmita\_k](https://community.dynatrace.com/u/susmita_k)\
**Post date:** [December 8, 2025, 10:31pm UTC](https://community.dynatrace.com/t/static-list-of-environment-as-a-variable-for-segment/54333/1 "2025-12-08T22:31:43Z")

</div>

Can I have static list of environment as a variable for segment?

---

<div class="post-metadata">

**Author:** ![Anderson-Luna](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Anderson-Luna](https://community.dynatrace.com/u/Anderson-Luna)\
**Post date:** [December 10, 2025, 1:49am UTC](https://community.dynatrace.com/t/static-list-of-environment-as-a-variable-for-segment/54333/2 "2025-12-10T01:49:22Z")

</div>

Hi Susmita

Yes, you can have a static list of environments as a variable for a segment in Dynatrace.

Dynatrace segments support variables whose values can be configured statically or dynamically. The static approach is ideal when your environment names (e.g., Production, Staging, Dev) are stable and do not need to be discovered from your data.

You define the static list of values directly using the Dynatrace Query Language (DQL) **data** command within the variable configuration.  
The following DQL query defines a variable (let’s call it $env\_name) with a static list of three environments:

```markup
data
record(env_name="Production"), 
record(env_name="Staging"), 
record(env_name="Development")

```

You can also check the official documentation&nbsp;[here](https://docs.dynatrace.com/docs/shortlink/segments-concepts-variables#variable-configuration)

Best,  
Anderson
