# Kibana 6.4.2 to Kibana 7.0 simple scripted field issue

**URL:** <https://discuss.elastic.co/t/kibana-6-4-2-to-kibana-7-0-simple-scripted-field-issue/237367>\
**Category:** Elasticsearch\
**Created:** [June 16, 2020, 10:03pm UTC](https://discuss.elastic.co/t/kibana-6-4-2-to-kibana-7-0-simple-scripted-field-issue/237367 "2020-06-16T22:03:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chowpay](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@chowpay](https://discuss.elastic.co/u/chowpay)\
**Post date:** [June 16, 2020, 10:03pm UTC](https://discuss.elastic.co/t/kibana-6-4-2-to-kibana-7-0-simple-scripted-field-issue/237367/1 "2020-06-16T22:03:05Z")

</div>

Porting over my stuff from 6.4.2 I had a very simple scripted field that looks like this (all values are in format Number:

`doc['ADN-KR'].value+doc['ADN-SSL-KR'].value+doc['LF-KR'.value]+doc['LF-SSL-KR'].value...` about 10 of these fields they are all numbers and it worked fine.

in 7.0  
doc['ADN-KR'].value causes an error (shard fails)  
doc['ADN-KR'] works fine  
doc['ADN-KR']+anything else fails (shard fail)

in 7.0 this kind of works:  
`doc['ADN-KR'].sum()+doc['ADN-SSL-KR'].sum() ... but any time it can blow up for no reason`

The logs don't seem to tell me why I get 2 types of errors:

1. shard fails but the error only shows my script and not why it failed
2. `agg.params.field.format.toJSON is not a function. (In 'agg.params.field.format.toJSON()', 'agg.params.field.format.toJSON' is undefined)`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 14, 2020, 10:03pm UTC](https://discuss.elastic.co/t/kibana-6-4-2-to-kibana-7-0-simple-scripted-field-issue/237367/2 "2020-07-14T22:03:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
