Add new values to the field if not available

I am splitting the rows on a field called names, if some names are not available in a given time frame I want to add it and display NA across other columns. Please help.

Example table:
name country state
n1 c1 s1 --- available
n2 c2 s2 --- available
n3 NA NA ---- n3 not available

here n3 is not present, but I want to display it saying not available/present


This should be achievable with a script field on the index pattern. Something like below should do the trick!

if(doc['vendor_name'] == null) {
    return 'N/A';
} else {
    return doc['vendor_name'].value;

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