Data table: prepopulation and calculation

Hello, I have a couple of questions.

  1. I followed this discussion, but I need to populate one column with the number from a field on the form ('TooledCapacity' it's a calculated field stored as number), can you help me how to do it?
fd.rendered(function(){
    var dt_rows = [];
    var row1 = {PYear: "1", VolProj: [TooledCapacity]};
    dt_rows.push(row1);
    fd.control('FA').value = dt_rows;
});
  1. Is it possible to do the progressive calculation based on the column, If a new row is added the calculation will go like this:
    09-17-2024 3-56-14 PM

BTW in this article, there is a mistake :slight_smile:
09-17-2024 4-09-52 PM

Hi @katy,

Thank you for pointing out the typo, we'll be sure to fix it.

Try creating the rows like this:

var row1 = {Column1: "1", Column2: fd.field('TooledCapacity').value};

You can assign any expression to the cells, for example

var row2 = {Column1: "1", Column2: fd.field('TooledCapacity').value * 1.5};

@IliaLazarevskii This was the first thing I tried Column2: fd.field('TooledCapacity').value and it doesn't work - it is not putting the number from the field into that cell. I also tried to point to any other number cell (normal, not calculated) and it doesn't work either.

About calculation I was more expecting something like if the next row is added then the cell is calculated, I don't really want to prepopulate more rows