Hey,
Creating a table visualisation with a scripted field.
When I add the field parent_name.keyword , Scripted, the table showing OK.
When I remove the field parent_name.keyword, I get the error below.
Could not find errors in logs (Kibana/Elastic), or maybe looking in the wrong place?

This is my script
def ans = "N/A";
if(doc['rel_type.keyword'].size()==0)
{
return ans;
}
else
{
def str = doc['rel_type.keyword'].value;
def len = str.length();
def i = str.lastIndexOf(':');
if(i != -1)
{
ans = str.substring(i+1,len);
}
else
{
return ans;
}
return '[' + ans+ '] ' + doc['parent_name.keyword'].value;
}
Bottom line,
The scripted field is made of a concatenation of a field, and it is required that the original field, that is concatenated in the script, will be part of the table?
Any thoughts?
Thanks

