Formating fields of a nested table

Hi all,

I’can’t get to format a nested table field. Can someone help me please ?

Here code generated by PPC designer

results.each(function(index) {
var field, result = “”;

field = record.tables["detail"][index0].tables["articles"][index1].fields["champs1"];
if (field !== 0) result += formatter.number(champs1, "#,##0.000");

this.html(result);});

Surely a mistake around index0 and index1

Thanks in advance,

Christophe

The value of the champs1 field is written to the field variable so I think you should replace ‘champs1’ in the formatter to ‘field’. Try the following:

if (field !== 0) result += formatter.number( field , "#,##0.000");

Erik