Do not want last value to show in dynamic table

Hi - I have dynamic data in a table. I have 6 values. the last value is ‘All’. I do not want to show that value in my table. I have a script I am trying to use but it isn’t working.

Am I close at all?

results.each(function(index){

var ageCnt = record.tables[“BalByAge”][index].fields[“pls_ageCnt”];
var field, result = “”;

for (var i = 0; i < results.length -1;i++)

field = ageCnt;		
if (field != "") result += field; 

this.html(result);

});

Thank you!

Try:

if (field != "" && field !="All") result += field;

1 Like

That helped me - thank you!!. I just had to tweak it a tiny bit but it works now.