# Bug!? Scripted Field Editing is not possible if Name have spaces like "This is a test"

**URL:** <https://discuss.elastic.co/t/bug-scripted-field-editing-is-not-possible-if-name-have-spaces-like-this-is-a-test/237451>\
**Category:** Kibana\
**Created:** [June 17, 2020, 10:23am UTC](https://discuss.elastic.co/t/bug-scripted-field-editing-is-not-possible-if-name-have-spaces-like-this-is-a-test/237451 "2020-06-17T10:23:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Datakids](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/datakids/32/39622_2.png) [@Datakids](https://discuss.elastic.co/u/Datakids)\
**Post date:** [June 17, 2020, 10:23am UTC](https://discuss.elastic.co/t/bug-scripted-field-editing-is-not-possible-if-name-have-spaces-like-this-is-a-test/237451/1 "2020-06-17T10:23:27Z")

</div>

Hi ES Team,

I found a bug (looks like a bug) which occurs to Kibana version 7.3.1 (not tested in other versions)

Here is what I did:

- add a Scripted Field
- Name: This is a test
- painless
- string
- string

Script:  
if (!doc.containsKey('Status.keyword') || doc['Status.keyword'].empty) { return "unavailable" } else { return doc['Status.keyword'].value }

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/4/a4e19399a5b52b5311a23e17b18647bd373b15cb.png)

Save...

If I now try to edit my new field, this error message comes up:

'my\_index' index pattern doesn't have a scripted field called 'This%20is%20a%20test'

If it is already acknowledged please ignore, if not please check 🙂

Thanks and regards  
Thorben

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [June 17, 2020, 9:16pm UTC](https://discuss.elastic.co/t/bug-scripted-field-editing-is-not-possible-if-name-have-spaces-like-this-is-a-test/237451/2 "2020-06-17T21:16:51Z")

</div>

I tested this on 7.6.2 and was not able to reproduce and I was unable to find any related ticket. Though, I have not heard of this issue, it's possible it was fixed in an unrelated PR.

---

<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 15, 2020, 9:16pm UTC](https://discuss.elastic.co/t/bug-scripted-field-editing-is-not-possible-if-name-have-spaces-like-this-is-a-test/237451/3 "2020-07-15T21:16:57Z")

</div>

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