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

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

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

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

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 .

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.

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