I’m using Running total script, it’s works fine within the same table.
But when I enter another table in first line, stop working!
This is my script.
// change these names to pick a view:
let table = base.getTable(‘Purchases’);
let inputConfig = input.config();
let view = table.getView(${inputConfig["Ad Set"]}
);
let result = await view.selectRecordsAsync();
let runningTotal = 0;
for (let record of result.records) {
// change the field names here to adapt this script to your base
runningTotal += record.getCellValue('Price');
await table.updateRecordAsync(record, {
'Revenue': runningTotal,
});
}