# Scripted Field doesn't appear in Visual Builder

**URL:** <https://discuss.elastic.co/t/scripted-field-doesnt-appear-in-visual-builder/124485>\
**Category:** Kibana\
**Created:** [March 19, 2018, 6:15am UTC](https://discuss.elastic.co/t/scripted-field-doesnt-appear-in-visual-builder/124485 "2018-03-19T06:15:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadab.gaur](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@shadab.gaur](https://discuss.elastic.co/u/shadab.gaur)\
**Post date:** [March 19, 2018, 6:15am UTC](https://discuss.elastic.co/t/scripted-field-doesnt-appear-in-visual-builder/124485/1 "2018-03-19T06:15:38Z")

</div>

Hi All,

Scenario: From Elasticsearch, I am getting chat participants as an array of string for each document.

For example - I am receiving data in Kibana something like this -

Document 1:

## "\_source": {

"participants": [  
"messenger",  
"john"  
],  
}

Document 2:

"participants": [  
"messenger",  
"Harry"  
],

My requirement is to display users talked on our messenger every hour for let say last 7 days.

To achieve the requirement - I created a Time series in Visual Builder and kept following configurations:  
aggregation = count  
aggregation = Count, Group By = Terms by participants  
and made other configurations required to display count per hour basis and kept the chart as stacked bar.

It creates time Series almost same what I want -- BUT graph/chart is including "messenger" as well in the list of users.

So the output I am getting in Visual Builder is something like as below -

messenger 2  
John 1  
Harry 1

While, I want to get something like ---

John 1  
Harry 1

I want to exclude "messenger" from my counts and display.

Then in order to achieve it - I created a scripted field which holds only "users", not the "messenger".

scripted\_user has values = John and Harry for respective documents.

But, seems visual Builder doesn't support use of scripted field.

If I can be able to "group by" on "scripted\_user" field in Visual Builder, my problem will get solve.

Could any of you please suggest how can I use scripted field in Visual Builder,  
Otherwise, any other solution for my use case.

Many thanks in advance.

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [March 19, 2018, 1:07pm UTC](https://discuss.elastic.co/t/scripted-field-doesnt-appear-in-visual-builder/124485/2 "2018-03-19T13:07:11Z")

</div>

Hey,

the usage of scripted fields inside of Visual Builder is at the moment an open issue: [#17100](https://github.com/elastic/kibana/issues/17100)

Please follow this to stay informed about the progress.

Cheers,  
Tim

---

<div class="post-metadata">

**Author:** ![shadab.gaur](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@shadab.gaur](https://discuss.elastic.co/u/shadab.gaur)\
**Post date:** [March 19, 2018, 11:22pm UTC](https://discuss.elastic.co/t/scripted-field-doesnt-appear-in-visual-builder/124485/3 "2018-03-19T23:22:21Z")

</div>

Meanwhile, could anybody suggest/guide me for any other alternative approach to meet my requirements?  
Is there any other way to build Timechart in Kiabana (other than visualBuilder) where I can use scripted field. Your suggestions are very much appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [March 20, 2018, 7:29am UTC](https://discuss.elastic.co/t/scripted-field-doesnt-appear-in-visual-builder/124485/4 "2018-03-20T07:29:05Z")

</div>

You can use any classical chart. E.g. just use a bar/area/line chart with date histogram on the x-axis on the desired field, and you'll have the timechart you want. Also all classical charts support scripted fields.

---

<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:** [April 17, 2018, 7:29am UTC](https://discuss.elastic.co/t/scripted-field-doesnt-appear-in-visual-builder/124485/5 "2018-04-17T07:29:12Z")

</div>

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