# Check if a field exists

**URL:** <https://discuss.elastic.co/t/check-if-a-field-exists/284545>\
**Category:** Logstash\
**Created:** [September 18, 2021, 2:24pm UTC](https://discuss.elastic.co/t/check-if-a-field-exists/284545 "2021-09-18T14:24:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 18, 2021, 4:25pm UTC](https://discuss.elastic.co/t/check-if-a-field-exists/284545/2 "2021-09-18T16:25:50Z")

</div>

> [@zeoiioze](#):
>
> What's the correct syntax ?

There isn't one. You [cannot](https://discuss.elastic.co/t/logstash-if-condition/250689) use a sprintf reference in a conditional.

---

_[View the full topic](https://discuss.elastic.co/t/check-if-a-field-exists/284545)._
