Running Balance, Cumulative Total Formula from Airtable Developers Page

Topic Labels: Formulas
359 0
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

I found this formula on the Airtable Developers Page

// change these names to pick a view:
let table = base.getTable('Invoices');
let view = table.getView('Grid view');
let result = await view.selectRecordsAsync({fields: ['Amount']});
let runningTotal = 0;
for (let record of result.records) {
// change the field names here to adapt this script to your base
runningTotal += record.getCellValue('Amount');
await table.updateRecordAsync(record, {
'Running total': runningTotal,

Has anyone used this? It's not working for me.  

0 Replies 0