Hello,
Is it possible for a good soul to fly to my rescue please?
I wish to apply the following script on my base with the constraint that the calcul must be reset each time I pass on a new groupfield.
Being a novice I don’t see how to modify my script to apply this constraint.
The script I use is:
let table = base.getTable(‘Data’);
let view = table.getView(‘Grid view’);
let result = await view.selectRecordsAsync({
sorts: [
{field: ‘Identifiant Fournisseur’},
]
});
let runningTotal = 0;
for (let record of result.records) {
runningTotal += record.getCellValue(‘Quantité Collectée’);
await table.updateRecordAsync(record, {
‘Test’: runningTotal,
});
}

