# Ability to filter devices by logically ORing rules

**URL:** <https://hub.mender.io/t/ability-to-filter-devices-by-logically-oring-rules/7262>\
**Category:** General Discussions\
**Tags:** hosted-mender\
**Created:** [October 22, 2024, 4:55pm UTC](https://hub.mender.io/t/ability-to-filter-devices-by-logically-oring-rules/7262 "2024-10-22T16:55:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbraunjones](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tbraunjones/32/2169_2.png) [@tbraunjones](https://hub.mender.io/u/tbraunjones)\
**Post date:** [October 22, 2024, 4:55pm UTC](https://hub.mender.io/t/ability-to-filter-devices-by-logically-oring-rules/7262/1 "2024-10-22T16:55:04Z")

</div>

I’m trying to create a deployment that targets devices where EITHER of the following is true:

- The `deploymentGroup` attribute does not exist
- The `deploymentGroup` attribute is “InternalInventory”

Since deployments can only target one group and I’d like to avoid maintaining two different sets of deployments, I went to create a dynamic group. Unfortunately there does not seem to be a what to create a filter for this. I tried things like:

- using the `in` operator with values like `"", InternalInventory` and `, InternalInventory`
- using a regex operator with a value `(|InternalInventory)$`

But none worked. Since this is pretty basic stuff, it feels like I’m just missing something?

This is in Hosted Mender with an Enterprise account.

---

<div class="post-metadata">

**Author:** ![estape.nt](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/estape.nt/32/2049_2.png) [@estape.nt](https://hub.mender.io/u/estape.nt)\
**Post date:** [October 22, 2024, 9:24pm UTC](https://hub.mender.io/t/ability-to-filter-devices-by-logically-oring-rules/7262/2 "2024-10-22T21:24:58Z")

</div>

Hi Taylor,

I hope you are doing well. As far as I know, the filtering logic works only as AND arguments. And for this case, in order to know whether an attribute exists, the specific operator is required, unfortunately as there is no OR, the second comparison will be excluded as they will not be a way to have both conditions happening at the same time. Let me bring this conversation with the team and see if there is an alternative option.

Kind regards

---

<div class="post-metadata">

**Author:** ![tbraunjones](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tbraunjones/32/2169_2.png) [@tbraunjones](https://hub.mender.io/u/tbraunjones)\
**Post date:** [October 29, 2024, 4:33pm UTC](https://hub.mender.io/t/ability-to-filter-devices-by-logically-oring-rules/7262/3 "2024-10-29T16:33:59Z")

</div>

Hi Esteban - Any update on this?

---

<div class="post-metadata">

**Author:** ![rdrouin](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rdrouin](https://hub.mender.io/u/rdrouin)\
**Post date:** [January 9, 2025, 5:55pm UTC](https://hub.mender.io/t/ability-to-filter-devices-by-logically-oring-rules/7262/4 "2025-01-09T17:55:39Z")

</div>

I also am interested in this feature. Any updates on this?
