# How can I check if TAG is present

**URL:** <https://forum.genieacs.com/t/how-can-i-check-if-tag-is-present/4136>\
**Category:** Uncategorized\
**Created:** [June 29, 2023, 6:31am UTC](https://forum.genieacs.com/t/how-can-i-check-if-tag-is-present/4136 "2023-06-29T06:31:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chmutoff](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@chmutoff](https://forum.genieacs.com/u/chmutoff)\
**Post date:** [June 29, 2023, 6:31am UTC](https://forum.genieacs.com/t/how-can-i-check-if-tag-is-present/4136/1 "2023-06-29T06:31:26Z")

</div>

Hi.

Can somebody tell me how to check if a specific TAG is present on a device?

I found this line of code in documentation:

```auto
let tag3 = declare("Tags.tag3", {value: 1})

```

But tag3 seems to be always an object, no matter if the tag is present or not. And I don’t know what’s inside the returned object. Can somebody explain how to check if a specific tag is present on CPE?

Regards.

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [June 29, 2023, 6:22pm UTC](https://forum.genieacs.com/t/how-can-i-check-if-tag-is-present/4136/2 "2023-06-29T18:22:41Z")

</div>

The tag is present if `tag3.value !== undefined`

---

<div class="post-metadata">

**Author:** ![chmutoff](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@chmutoff](https://forum.genieacs.com/u/chmutoff)\
**Post date:** [June 29, 2023, 7:59pm UTC](https://forum.genieacs.com/t/how-can-i-check-if-tag-is-present/4136/3 "2023-06-29T19:59:03Z")

</div>

Thank you!

I also figured out that I can check tag3.size
