Can we access a scripted field with a scripted field

Kibana version : 7.9

Elasticsearch version : 7.9

APM Server version : 7.9

APM Agent language and version : java 1.8

Fresh install or upgraded from other version? fresh install

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. :-no

I have to create a scripted field and need to access another scripted field from the newly created scripted field. I tried doc['scriptedfield'] and it doesnt seem to work.

How else can I access it ?

Just tested and I couldn't either which makes sense because scripted fields are generated as they are being used.

Why not just recreate the functionality in scripted field # 2 that you do in scripted field #1 and then add on your additional requirements? It's not the most effective solution but will work.

1 Like