# Add Scripted Field in Kibana to Count Characters of a field and add show the count in another field

**URL:** <https://discuss.elastic.co/t/add-scripted-field-in-kibana-to-count-characters-of-a-field-and-add-show-the-count-in-another-field/175109>\
**Category:** Elasticsearch\
**Created:** [April 3, 2019, 7:01am UTC](https://discuss.elastic.co/t/add-scripted-field-in-kibana-to-count-characters-of-a-field-and-add-show-the-count-in-another-field/175109 "2019-04-03T07:01:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John\_Guzman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_guzman/32/83587_2.png) [@John\_Guzman](https://discuss.elastic.co/u/John_Guzman)\
**Post date:** [April 25, 2019, 4:24pm UTC](https://discuss.elastic.co/t/add-scripted-field-in-kibana-to-count-characters-of-a-field-and-add-show-the-count-in-another-field/175109/2 "2019-04-25T16:24:02Z")

</div>

Look at this post: [String size limit in painless / keyword field?](https://discuss.elastic.co/t/string-size-limit-in-painless-keyword-field/108366)

You can make the same in Index Patterns - Pick your index - Scripted Fields.  
I think that code is counting the quotation marks so just add -2 to the operation.

---

_[View the full topic](https://discuss.elastic.co/t/add-scripted-field-in-kibana-to-count-characters-of-a-field-and-add-show-the-count-in-another-field/175109)._
