# How to select multiple entityName.startsWith statements?

**URL:** <https://community.dynatrace.com/t/how-to-select-multiple-entityname-startswith-statements/52006>\
**Category:** Container platforms\
**Tags:** container, entity-selector, kubernetes\
**Created:** [June 10, 2025, 3:02pm UTC](https://community.dynatrace.com/t/how-to-select-multiple-entityname-startswith-statements/52006 "2025-06-10T15:02:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![larry\_roberts](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/larry_roberts/32/7131_2.png) [@larry\_roberts](https://community.dynatrace.com/u/larry_roberts)\
**Post date:** [June 10, 2025, 3:02pm UTC](https://community.dynatrace.com/t/how-to-select-multiple-entityname-startswith-statements/52006/1 "2025-06-10T15:02:36Z")

</div>

I am trying to make some of our rules more efficient and cut down on the amount of rules needed for auto tags. Does anyone know if it is possible to add an OR statement as part of the syntax below?

```markup
type(CONTAINER_GROUP),toRelationships.isInstanceOf(type(CONTAINER_GROUP_INSTANCE),fromRelationships.isCgiOfNamespace(type(CLOUD_APPLICATION_NAMESPACE),entityName.startsWith("example1")))

```

For example, I want to select multiple namespaces in this case, like:

**example1 OR example 2 OR example 3&nbsp;And so on.**

Is that even possible using entityName.startsWith?

The following works as an OR but it is based on the ID of the namespace as to where I want to do the same but, by the namespace name instead which does not seem to work.

```markup
type(CONTAINER_GROUP),torelationships.isInstanceOf(type(CONTAINER_GROUP_INSTANCE),fromRelationships.isCgiOfNamespace(type(CLOUD_APPLICATION_NAMESPACE),entityId("CLOUD_APPLICATION_NAMESPACE-1234","CLOUD_APPLICATION_NAMESPACE-5678")))

```

Thanks!

---

<div class="post-metadata">

**Author:** ![Akhil-Jayendran](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/akhil-jayendran/32/153_2.png) [@Akhil-Jayendran](https://community.dynatrace.com/u/Akhil-Jayendran)\
**Post date:** [June 10, 2025, 4:16pm UTC](https://community.dynatrace.com/t/how-to-select-multiple-entityname-startswith-statements/52006/2 "2025-06-10T16:16:29Z")

</div>

Hello&nbsp;[@larry\_roberts](https://community.dynatrace.com/user/33677)&nbsp;,

It seems that an OR condition is not supported with entityName.startsWith, as it does not accept multiple values. Therefore, using a call like entityName.startsWith(“name”, “name1”, “etc”) is not valid, I belive.

> **[Environment API v2 - Entity selector](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/entity-selector)**
>
> Learn the Environment API v2 entity selector syntax for filtering monitored entities by type, name, tag, management zone, and health state.

I think it would be better to have DQL support for configuration auto-tagging, or some kind of auto-tagging app specifically for configurations. Not sure already there ?

---

<div class="post-metadata">

**Author:** ![larry\_roberts](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/larry_roberts/32/7131_2.png) [@larry\_roberts](https://community.dynatrace.com/u/larry_roberts)\
**Post date:** [June 10, 2025, 4:46pm UTC](https://community.dynatrace.com/t/how-to-select-multiple-entityname-startswith-statements/52006/3 "2025-06-10T16:46:29Z")

</div>

Yeah seems to be what I am finding as well. It was worth the question 🙂

I did created an [RFE](https://community.dynatrace.com/post/279044#M52337) on this.

Thanks!
