# Kibana control v 8.5.3 does not support scripted fields neither field created in data view

**URL:** https://discuss.elastic.co/t/kibana-control-v-8-5-3-does-not-support-scripted-fields-neither-field-created-in-data-view/324257
**Category:** Kibana
**Created:** [January 30, 2023, 5:28pm UTC](https://discuss.elastic.co/t/kibana-control-v-8-5-3-does-not-support-scripted-fields-neither-field-created-in-data-view/324257 "2023-01-30T17:28:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![monica.brandao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monica.brandao/32/116604_2.png) [@monica.brandao](https://discuss.elastic.co/u/monica.brandao)
#### Post date: [January 30, 2023, 5:28pm UTC](https://discuss.elastic.co/t/kibana-control-v-8-5-3-does-not-support-scripted-fields-neither-field-created-in-data-view/324257/1 "2023-01-30T17:28:31Z")

</div>

In a previous version of Kibana I had some controls that in the new version are deprecated.  
As I imported the visualizatiosn to the new version, I changed the control to the new verson funcionality,.

One of my fields was a scripted field in the old version, but in the new does not appear to be selected in control .

The fact is that, I need to create a extra field that act like a dictionary for a numeric field and later it will be used as in a control to act like a filter.

e.g. of the field code:  
if (doc['header.type'].value == 0 )  
{  
emit('Macro');  
}  
if (doc['header.type'].value == 1 )  
{  
emit('Posição');  
}  
if (doc['header.type'].value == 2 )  
{  
emit('Ack');  
}

I tried to create a field in data view with this code, but as I select it in my dashboard control no values appears.  
Than I tried also to recreate the scripted field but it does not appear to be selected in my dashboard control.

How can I handle that?  
Thanks

---

<div class="post-metadata">

### Author: ![Stratoula\_Kalafateli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stratoula_kalafateli/32/70923_2.png) [@Stratoula\_Kalafateli](https://discuss.elastic.co/u/Stratoula_Kalafateli)
#### Post date: [January 31, 2023, 10:33am UTC](https://discuss.elastic.co/t/kibana-control-v-8-5-3-does-not-support-scripted-fields-neither-field-created-in-data-view/324257/2 "2023-01-31T10:33:38Z")

</div>

I think that scripted fields are not going to be supported for the new controls. Check here [[Dashboard][Controls] Scripted and Runtime Field Support for Options List · Issue #126730 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/126730)

Why don't you use runtime fields instead that are supported? Scripted fields are deprecated and we advice to use runtime fields instead.

---

<div class="post-metadata">

### Author: ![monica.brandao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monica.brandao/32/116604_2.png) [@monica.brandao](https://discuss.elastic.co/u/monica.brandao)
#### Post date: [January 31, 2023, 12:39pm UTC](https://discuss.elastic.co/t/kibana-control-v-8-5-3-does-not-support-scripted-fields-neither-field-created-in-data-view/324257/3 "2023-01-31T12:39:01Z")

</div>

Hi @Stratoula_Kalafateli ,

Thanks for your reply!

I´ve tried runtime field as keyword, using the code of the fisrt post.  
I could choose the field in the control functionality, but as I opened the control option list no results are comming, even if I could see the values of the field in discoverer .

---

<div class="post-metadata">

### Author: ![Stratoula\_Kalafateli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stratoula_kalafateli/32/70923_2.png) [@Stratoula\_Kalafateli](https://discuss.elastic.co/u/Stratoula_Kalafateli)
#### Post date: [January 31, 2023, 12:48pm UTC](https://discuss.elastic.co/t/kibana-control-v-8-5-3-does-not-support-scripted-fields-neither-field-created-in-data-view/324257/4 "2023-01-31T12:48:29Z")

</div>

Yes you are right! It seems that the team added the support of runtime fields on 8.6. I just did a test there and I can see the options in the list.

---

<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: [February 28, 2023, 12:49pm UTC](https://discuss.elastic.co/t/kibana-control-v-8-5-3-does-not-support-scripted-fields-neither-field-created-in-data-view/324257/5 "2023-02-28T12:49:23Z")

</div>

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