# Unable to convert a field from string to integer that is dynamically generated in Logstash filter

**URL:** https://discuss.elastic.co/t/unable-to-convert-a-field-from-string-to-integer-that-is-dynamically-generated-in-logstash-filter/300224
**Category:** Logstash
**Created:** [March 21, 2022, 3:53pm UTC](https://discuss.elastic.co/t/unable-to-convert-a-field-from-string-to-integer-that-is-dynamically-generated-in-logstash-filter/300224 "2022-03-21T15:53:40Z")
**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: [March 21, 2022, 6:45pm UTC](https://discuss.elastic.co/t/unable-to-convert-a-field-from-string-to-integer-that-is-dynamically-generated-in-logstash-filter/300224/2 "2022-03-21T18:45:03Z")

</div>

> [@Usman18](#):
>
> Can anyone guide me in this regard?

See [this](https://discuss.elastic.co/t/cannot-convert-created-field-to-integer/299005/6) post. You cannot use a sprintf reference in the source of a convert.

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-convert-a-field-from-string-to-integer-that-is-dynamically-generated-in-logstash-filter/300224)._
