# \[6.2.4\] machine learning on scripted field

**URL:** <https://discuss.elastic.co/t/6-2-4-machine-learning-on-scripted-field/132146>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [May 16, 2018, 2:11pm UTC](https://discuss.elastic.co/t/6-2-4-machine-learning-on-scripted-field/132146 "2018-05-16T14:11:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dao](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dao](https://discuss.elastic.co/u/dao)\
**Post date:** [May 16, 2018, 2:11pm UTC](https://discuss.elastic.co/t/6-2-4-machine-learning-on-scripted-field/132146/1 "2018-05-16T14:11:33Z")

</div>

Continuing the discussion from [Machine Learning on scripted field?](https://discuss.elastic.co/t/machine-learning-on-scripted-field/89054/2):

it seems to work,

It is not possible to select a field name that is not in the list of existing fields (in detectors). but is is not a problem as the JSON can be modified afterwards

My issue is that I cannot see the graph in the single metric viewer. How can I do?:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/1/71de253f5613f826a8612aeca8993595aee015e5.png)

---

<div class="post-metadata">

**Author:** ![dmitri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmitri/32/17997_2.png) [@dmitri](https://discuss.elastic.co/u/dmitri)\
**Post date:** [May 17, 2018, 1:41pm UTC](https://discuss.elastic.co/t/6-2-4-machine-learning-on-scripted-field/132146/2 "2018-05-17T13:41:00Z")

</div>

Hi Olivier,

It is a known limitation that the Single Metric Viewer does not support scripted fields. The button should be disabled really. I'll take your feedback back to the team.

Kind regards,  
Dimitris

---

<div class="post-metadata">

**Author:** ![Peter\_Harverson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_harverson/32/21057_2.png) [@Peter\_Harverson](https://discuss.elastic.co/u/Peter_Harverson)\
**Post date:** [May 17, 2018, 3:42pm UTC](https://discuss.elastic.co/t/6-2-4-machine-learning-on-scripted-field/132146/3 "2018-05-17T15:42:59Z")

</div>

Olivier,

Would it be possible for you to post the job configuration you are using (you can copy the config as JSON from the Job Management page - expand the job and switch to the JSON tab)? Or if not, could you confirm if `egt_corrected` is the scripted field you created in the `script_fields` section of the `datafeed_config` of the job?

We don't currently support viewing detectors with scripted fields in the Single Metric Viewer, so the links to the Single Metric Viewer should be disabled for detectors which use scripted fields. However the fact that you managed to open the job for that detector in the Single Metric Viewer makes me think that the checks we are doing aren't quite right.

Many thanks  
Pete

---

<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:** [October 30, 2018, 10:21pm UTC](https://discuss.elastic.co/t/6-2-4-machine-learning-on-scripted-field/132146/4 "2018-10-30T22:21:35Z")

</div>


