# If/Else comparison to add tag

**URL:** https://discuss.elastic.co/t/if-else-comparison-to-add-tag/248706
**Category:** Logstash
**Created:** [September 15, 2020, 3:41pm UTC](https://discuss.elastic.co/t/if-else-comparison-to-add-tag/248706 "2020-09-15T15:41:18Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [September 15, 2020, 6:57pm UTC](https://discuss.elastic.co/t/if-else-comparison-to-add-tag/248706/4 "2020-09-15T18:57:54Z")

</div>

Are you certain the field always exists? See [this](https://discuss.elastic.co/t/comparing-number-in-conditionnal-event-treatement/217043/5) thread.

---

_[View the full topic](https://discuss.elastic.co/t/if-else-comparison-to-add-tag/248706)._
