# Drilldown on Kibana Scripted Fields

**URL:** <https://discuss.elastic.co/t/drilldown-on-kibana-scripted-fields/285520>\
**Category:** Kibana\
**Tags:** painless\
**Created:** [September 29, 2021, 8:34pm UTC](https://discuss.elastic.co/t/drilldown-on-kibana-scripted-fields/285520 "2021-09-29T20:34:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mightykat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mightykat/32/95050_2.png) [@mightykat](https://discuss.elastic.co/u/mightykat)\
**Post date:** [September 29, 2021, 8:34pm UTC](https://discuss.elastic.co/t/drilldown-on-kibana-scripted-fields/285520/1 "2021-09-29T20:34:55Z")

</div>

Kibana: 7.1.1

**Background:**  
I created a few `Scripted Fields` in Kibana using painless to parse a list of key/value pairs. I use different scripts to produce data formats to enable various visualizations. For example:

1. **Pie Chart** : Top 1 key only
2. **Bar Chart** : Top 5 keys only, and
3. **Data Table** : "key1(value1%), key2(value2%), ..." fields (custom stitched string with top-5 both key and value pairs)

**Concern:**  
Drilldowns are extremely important for our usecase. On a typical Kibana Dashboard Visualization it is straight forward to drill-down into data by clicking a chart element to enable a filter on that field: key/value. Or to have a Dashboard Control element that enables similar filtering/drilldown. However, I am unable to drill-down on a _scripted-field_ based visualization (say Pie Chart/Bar Chart) when I click an element (sector/bar respectively). The visualizations present a `No results found` status ☹

**Question:**  
1.What can I do to fix/enable drilldowns on scripted fields? 💡  
2. Are there any workarounds I can try? 👨‍🏭  
3. Alternatively, is there a way to disable clicking (drilldowns) on Visualizations created by scripted fields - so as to be clear to the user that drill-down is not supported on a specific visualization? May be using advanced javascript? ☹

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 30, 2021, 11:08pm UTC](https://discuss.elastic.co/t/drilldown-on-kibana-scripted-fields/285520/2 "2021-09-30T23:08:06Z")

</div>

Welcome to our community! 😃

> [@mightykat](#):
>
> Kibana: 7.1.1

This is very much past [EOL](https://www.elastic.co/support/eol), please upgrade ASAP and see if that solves your problems.

---

<div class="post-metadata">

**Author:** ![mightykat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mightykat/32/95050_2.png) [@mightykat](https://discuss.elastic.co/u/mightykat)\
**Post date:** [October 13, 2021, 8:32pm UTC](https://discuss.elastic.co/t/drilldown-on-kibana-scripted-fields/285520/3 "2021-10-13T20:32:18Z")

</div>

Kibana: 7.10.2

@warkolm Unfortunately, I still can't drilldown after upgrading to 7.10.2

### Before Drilldown: Graphs with Data populated using Painless Scripted fields (some content redacted)

 ![Screen Shot 2021-10-13 at 1.20.54 PM](https://us1.discourse-cdn.com/elastic/original/3X/4/9/49126858ad548ad961453e74d8923dc8f5e09b2d.jpeg)

* * *

### After Drilldown Filter (applied by clicking the first column: 'Support' on the top right bar chart): No Data populated on the above graphs ☹

 ![Screen Shot 2021-10-13 at 1.18.23 PM](https://us1.discourse-cdn.com/elastic/original/3X/3/7/378206ba53f026ffbb2dcd20f5c2d2dbeac5cf17.jpeg)

---

<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:** [November 10, 2021, 8:32pm UTC](https://discuss.elastic.co/t/drilldown-on-kibana-scripted-fields/285520/4 "2021-11-10T20:32:50Z")

</div>

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